[squeak-dev] Where does the compiler handle the "local bindings" of workspaces?

karl ramberg karlramberg at gmail.com
Tue Feb 28 18:05:46 UTC 2023


Hi,
I sent the wrong version.
This should work

Best,
Karl

On Tue, Feb 28, 2023 at 12:40 PM karl ramberg <karlramberg at gmail.com> wrote:

> Hi,
> Try executing this:
> HelpBrowser initialize
>
> Best,
> Karl
>
>
>
> On Tue, Feb 28, 2023 at 8:18 AM Eduardo Ochs <eduardoochs at gmail.com>
> wrote:
>
>> Wow! Thanks!!! =) =) =)
>> But I've tried to put these five lines
>>
>>   sm := SimpleSwitchMorph new.
>>   sm openInWorld.
>>   bm := SimpleButtonMorph new.
>>   bm openInWorld.
>>   bm position: bm position + (0 at 32).
>>
>> in a topic window, and then execute the first four lines in a "do it",
>> then the fifth line in another "do it"... when I tried that I got an
>> error in this method,
>>
>>   HelpBrowser >> bindingOf:
>>
>> because it tried to execute
>>
>>   bindings includesKey: aString
>>
>> with bindings being nil... can you fix that?
>>
>>   Thanks in advance! =)
>>     Eduardo Ochs
>>
>>
>> On Tue, 28 Feb 2023 at 03:27, karl ramberg <karlramberg at gmail.com> wrote:
>>
>>> See change set in attachment for adding dynamic bindings to HelpBrowser.
>>> It's a proof of concept :-)
>>>
>>> Best,
>>> Karl
>>>
>>> On Mon, Feb 27, 2023 at 9:42 AM Eduardo Ochs <eduardoochs at gmail.com>
>>> wrote:
>>>
>>>> Hi Karl,
>>>>
>>>> > In HelpBrowser you must declare the variables before using them.
>>>> > (...)
>>>> > HelpBrowser does not implement dynamic binding of variables.
>>>>
>>>> Yes - my first idea was to ask here what I needed to change in my
>>>> class TerseGuideHelp to make the "workspace" of its help browser use
>>>> dynamic biding of variables... but then I spent some hours trying to
>>>> find the answer myself, and I stumbled on a more low-level question
>>>> that I found much more askworthy...
>>>>
>>>> > You can right click on a Workspace window and a HelpBrowser window
>>>> > and inspect the model and see the differences.
>>>>
>>>> I did that. Are these differences obvious to a trained eye? They
>>>> weren't to me.
>>>>
>>>> > Also browse class Workspace and look at access to variable
>>>> > 'bindings'.
>>>>
>>>> This may be a pointer to searching tools that I need to learn. I saw
>>>> that if I click on "variables" and then on "bindings" I get a list of
>>>> the methods in Workspace that access the variable "bindings"... I also
>>>> tried to fileOut the class Workspace and to read it in Emacs, and I
>>>> found the same occurrences.
>>>>
>>>> Here is an educated guess. Is the method "hasBindingOf:" the main
>>>> piece needed to make a mini-workspace support dynamic variables? If
>>>> so, how, exactly? Is there a part of the compiler that calls
>>>> "hasBindingOf:" when it sees an unknown variable? I couldn't find
>>>> it...
>>>>
>>>>   Cheers,
>>>>     Eduardo Ochs
>>>>
>>>>
>>>>
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20230228/a6da0a9b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: HelpBrowserDynamicBinding.2.cs
Type: application/octet-stream
Size: 2381 bytes
Desc: not available
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20230228/a6da0a9b/attachment.obj>


More information about the Squeak-dev mailing list