Nesting DynamicVariables

Keith Hodges keith_hodges at yahoo.co.uk
Sat Oct 27 16:50:33 UTC 2007


Lukas Renggli wrote:
>> Now if there were any number of this things in an OrderedCollection how
>> would I efficiently or otherwise evaluate this code nested n times deep.
>>     
>
> The easiest would be if you let a specific dynamic variable return an
> object (e.g. an ordered-collection or a dictionary), that knows all
> your objects.
>
> There is also the package DynamicBindings, that provides a whole
> framework for doing things like this.
>
> Lukas
>   

Hi Lukas,

Overnight I came to the same conclusion, that what I was trying was too
complex for a simple problem.

I am trying to support a number of orthogonal requirements on WASession
without subclassing, but it doesnt have a properties dictionary where I
can stuff things. I need slots for more than one db session, and an
announcements announcer amongst other things.

Thanks for the suggestion, I could have just one other DynamicVariable
working in tandem with WACurrentSession and that could hold the other
values.

How performant are these DynamicVariable lookups?

many thanks

Keith



More information about the Squeak-dev mailing list