[squeak-dev] recategorize a bunch

Eliot Miranda eliot.miranda at gmail.com
Sun Mar 1 19:28:39 UTC 2009


On Sun, Mar 1, 2009 at 10:59 AM, Sebastian Sastre <ssastre at seaswork.com>wrote:

>  Hi Eliot,
> yes, I've called the method allActualMethodsInCategory: to clarify what
> should be ovbious (so not need to clarify) but the clarification is needed
> because someone made a transformation of a method into a string without
> clarifiying it properly like allMethodsNamesInCategory: or
> allMethodsAsStringsInCategory: Annoying really.
>

In Smalltalk-80 the list browsers used to consume a list of strings of the
form 'ThisClass>selector' or 'ThatClass class>selector' which was a pain in
the behind to parse.  Some of these vestiges still exist in
SystemNavigation.  In our image at Qwaq I've been modifying the last of
these to answer MethodReference.

What I find annoying is that MethodReference understands methodSymbol
instead of selector, and actualClass instead of implementingClass ;)


> Note that in the new category you must put some category different from 'as
> yet unclassified' or it will be ignored otherwise.
> I've also noted particularly confusive to find something
> categorizable which is not categorized named under: 'not yet classified'. I
> mean, we have a system that uses the concept of class for something
> completely different. That is like a digital kick in the but for those who
> don't have it perflectly clear before dropping into squeak.
>
> In the other hand, I found as usual here, a very helpful community and you
> Eliot where very kind in sending that script.
>
> Again Eliot, thanks a lot, now I've rescued about ~400 methods imagine
> doing that manually :)
>

You're welcome.  Getting to know SystemNavigation, especially things like
browseAllSelect: and combining the results of several queries is worth it
because they can really help in browsing, source generation etc.

Best
Eliot

best
> sebastian
>
>
>  ------------------------------
> *De:* squeak-dev-bounces at lists.squeakfoundation.org [mailto:
> squeak-dev-bounces at lists.squeakfoundation.org] *En nombre de *Eliot
> Miranda
> *Enviado el:* Sunday, March 01, 2009 04:09
> *Para:* The general-purpose Squeak developers list
> *Asunto:* Re: [squeak-dev] recategorize a bunch
>
>
>
> On Sat, Feb 28, 2009 at 7:42 PM, Sebastian Sastre <ssastre at seaswork.com>wrote:
>
>> hi there, while loading some stuff of mine form an image to another, I was
>> annoyed/surprised by not finding some methods. Then I've figured out that
>> all
>> not imported methods where missing because somehow they happen to be under
>> a
>> category named *-changed some others under *-compilation-issues.
>>
>> There is a way I can query the system (monticello?) to get the whole and
>> set
>> them another category (so I can save the packageproperly)?
>
>
> Let's say that SystemNavigation>>allMethodsInCatergory: answers
> MethodReference instances instead of 'Classd>selector' string thingies, and
> if it doesn't that it can by defining it as
>
> SystemNavigation methods for query
> allMethodsInCategory: category
> | aCollection |
> aCollection := Set new.
> Cursor wait showWhile:
> [self allBehaviorsDo:
> [:x |
> ((category = ClassOrganizer allCategory
> ifTrue: [x organization allMethodSelectors]
> ifFalse: [x organization listAtCategoryNamed: category])) do:
> [:sel | aCollection add: (MethodReference new setStandardClass: x
> methodSymbol: sel)]]].
> ^aCollection.
>
> then you want to say
>
>     (SystemNavigation default allMethodsInCategory: #'* whatever the
> category * was called') do:
>         [:mr|
>         mr actualClass organization
>             classify: mr methodSymbol
>             under: #'what I would like the category to be']
>
>
>>
>>
>> thanks,
>>
>> sebastian
>>
>>
>>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090301/5f9f898f/attachment.htm


More information about the Squeak-dev mailing list