Begin forwarded message:

From: Eliot Miranda <eliot.miranda@gmail.com>
Date: March 1, 2009 8:08:46 AM CEST
To: The general-purpose Squeak developers list <squeak-dev@lists.squeakfoundation.org>
Subject: Re: [squeak-dev] recategorize a bunch
Reply-To: The general-purpose Squeak developers list <squeak-dev@lists.squeakfoundation.org>



On Sat, Feb 28, 2009 at 7:42 PM, Sebastian Sastre <ssastre@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