[Cuis-dev] Recent changes to Encoder (update 4156?)
Luciano Notarfrancesco
luchiano at gmail.com
Wed May 27 09:01:18 PDT 2020
I've been seeing a problem and it might be related. To reproduce it, go to
a workspace that already has some text in it, and somewhere in the middle
print '1 asCharacter', then select the little square (the character 1) and
doIt. It produces a parsing error and the notification is shown at the
wrong place in the workspace. This is just one way to reproduce it, not
like one would want to often use invalid characters...
On Wed, May 27, 2020 at 4:13 PM Phil B via Cuis-dev <cuis-dev at lists.cuis.st>
wrote:
> I recall running into an issue re: Encoder changes Hernan did a while back
> and now I'm having a nearly identical issue related to the recent changes.
>
> Specifically: multi-ranges and the brittleness of that code in that if you
> don't provide the exact right hacked version of the 'range' (i.e. sometimes
> it's an Interval, sometimes it's a collection of Interval), things will
> fail. So now I'm having a problem after the latest changes with
> #noteSourceRange:forNode: complaining because I'm passing it a collection
> of ranges where it now expects a single range. I'm only passing it a
> collection of ranges because the *previous* changes to Encoder would break
> if you only passed in a single range. Of course, if I change my code back
> to passing a single range (i.e. undoing my fix for the last Encoder
> change), it breaks things elsewhere where it's expecting a collection of
> ranges. Essentially the solution that I used previously was to create a
> MessageNode with a sourceRange: parameter that was a collection... that no
> longer appears to be viable.
>
> Can this be either cleaned up (i.e. auto-detect or just use multi-ranges
> everywhere) or better document (and stick with!) the approach?
>
> Thanks,
> Phil
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200527/206b10fc/attachment.htm>
More information about the Cuis-dev
mailing list