[squeak-dev] How to use pool dictionaries in a workspace?
Louis LaBrunda
Lou at Keystone-Software.com
Tue Mar 5 19:51:35 UTC 2013
Hi Bob,
>Have you tried
>Workspace addLookupPool: MyPool?
Thanks, that works great although the #removeLookupPool: doesn't seem to
turn it off but I'm not sure I care.
>Although I wonder why one would go to the trouble. Why not just put the
>code in a method that can reference the pool normally?
One could say that about anything you might want to play with in a
workspace. As I said, I often work up code in a workspace and then copy it
to a method when I'm happy with it. If I can't use pool references in the
workspace, I then have to change things when I want to make a real method.
Thanks again for the help.
Lou
>On 3/5/13 1:56 PM, Louis LaBrunda wrote:
>> Hi,
>>
>> When I want to use values defined in a pool dictionary in VA Smalltalk, I
>> put the following lines at the top of the workspace (I often save
>> workspaces for repeat use):
>>
>> "
>> EtWindow defaultEvaluationPools: (EtWindow defaultEvaluationPools asSet
>> addAll: #(#PoolDictionaryName)) asArray.
>> EtWindow defaultEvaluationPools: nil.
>> "
>>
>> If I execute the first line (not counting the comment " line and not
>> wrapped) The named pool dictionary is available to the workspace. I can
>> test code as if the pool dictionary were specified for the class and I was
>> writing a method. This way when I'm happy with the code, I can just copy
>> it to a method and use it as is. The second line puts things back the way
>> it was.
>>
>> I would love to be able to do this with Squeak. Does anyone have any idea
>> how to do this with Squeak? Or point me in the right direction?
>>
>> Lou
>> -----------------------------------------------------------
>> Louis LaBrunda
>> Keystone Software Corp.
>> SkypeMe callto://PhotonDemon
>> mailto:Lou at Keystone-Software.com http://www.Keystone-Software.com
>>
>>
>>
-----------------------------------------------------------
Louis LaBrunda
Keystone Software Corp.
SkypeMe callto://PhotonDemon
mailto:Lou at Keystone-Software.com http://www.Keystone-Software.com
More information about the Squeak-dev
mailing list
|