Remove a pool dictionary

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Remove a pool dictionary

Ted Bracht-2
Hi,

Is there a tidy way to remove a pool dictionary?

When you go into the Pool Dictionaries Inspector, you can set it to
nil but you can't remove it. (and even if you set it to nil, the next
time you go in it is a PoolConstantsDictionary again)

In a workspace you can't execute 'Smalltalk removeKey: PoolName' as
that returns 'PoolConstantsDictionary doesNotUnderstand: #asSymbol'

So the only way that I could find is to execute 'Smalltalk inspect',
then find the global and remove it from that inspector.

Is there a better way? Would it be a good idea to have a 'Remove' menu
option in the Pool Dictionaries inspector?

Thanks,

Ted


Reply | Threaded
Open this post in threaded view
|

Re: Remove a pool dictionary

Dmitry Zamotkin-3
"Ted Bracht" <[hidden email]> wrote in message
news:[hidden email]...

> Hi,
>
> Is there a tidy way to remove a pool dictionary?
>
> When you go into the Pool Dictionaries Inspector, you can set it to
> nil but you can't remove it. (and even if you set it to nil, the next
> time you go in it is a PoolConstantsDictionary again)
>
> In a workspace you can't execute 'Smalltalk removeKey: PoolName' as
> that returns 'PoolConstantsDictionary doesNotUnderstand: #asSymbol'
>
> So the only way that I could find is to execute 'Smalltalk inspect',
> then find the global and remove it from that inspector.
>
> Is there a better way?

I use next sequence:
1. Remove a PoolDictionary from the owning package.
2. Evaluate:
Smalltalk removeGlobalNamed: poolDictionarySymbol

Would it be a good idea to have a 'Remove' menu
> option in the Pool Dictionaries inspector?

It would be nice...

>
> Thanks,
>
> Ted

Dmitry


Reply | Threaded
Open this post in threaded view
|

Re: Remove a pool dictionary

bmurphy
In reply to this post by Ted Bracht-2
Try putting the '#' in front of the pool name:
    Smalltalk removeKey: #PoolName

Brian Murphy-Dye

Ted Bracht wrote:

>
> Hi,
>
> Is there a tidy way to remove a pool dictionary?
>
> When you go into the Pool Dictionaries Inspector, you can set it to
> nil but you can't remove it. (and even if you set it to nil, the next
> time you go in it is a PoolConstantsDictionary again)
>
> In a workspace you can't execute 'Smalltalk removeKey: PoolName' as
> that returns 'PoolConstantsDictionary doesNotUnderstand: #asSymbol'
>
> So the only way that I could find is to execute 'Smalltalk inspect',
> then find the global and remove it from that inspector.
>
> Is there a better way? Would it be a good idea to have a 'Remove' menu
> option in the Pool Dictionaries inspector?
>
> Thanks,
>
> Ted