Fwd: [squeak-dev] recategorize a bunch

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

Fwd: [squeak-dev] recategorize a bunch

Stéphane Ducasse


Begin forwarded message:

From: Eliot Miranda <[hidden email]>
Date: March 1, 2009 8:08:46 AM CEST
To: The general-purpose Squeak developers list <[hidden email]>
Subject: Re: [squeak-dev] recategorize a bunch
Reply-To: The general-purpose Squeak developers list <[hidden email]>



On Sat, Feb 28, 2009 at 7:42 PM, Sebastian Sastre <[hidden email]> 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






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project