[squeak-dev] Reusable browsers was Re: About HyperCard

Yoshiki Ohshima Yoshiki.Ohshima at acm.org
Sun Mar 3 18:47:03 UTC 2013


On Sat, Mar 2, 2013 at 6:23 PM, Bob Arning <arning315 at comcast.net> wrote:
> I think you'll find that now works as you expect with the code I posted
> earlier (once you use the #findSelector2 instead of #findSelector).

Ah, I did not try that before posting my email.  Sorry.

> After posting the code I started wondering about other possible odd
> situations, like what is expected from
>
> self x: 1; y: 2
>
> Right now it considers the selector to be #x:y: . Easy enough to fix, but is
> the right answer #x:, #y: or nothing?

Hmm, that is an interesting trade-off, but I tend to favor an
understanding behavior with less special cases, so the logic would be
"look for a selector within the selection and when it is delimited,
stop searching." (And the question here was now to ignore unnecessary
parts that don't constitute the final result.  If this is how it
works, I don't mind that the result is just #x:.

There are other cases that gives you some surprises, such as getting
the implementors of #ifTrue:, which usually never be what you want...

--
-- Yoshiki


More information about the Squeak-dev mailing list