[squeak-dev] recategorize a bunch
Sebastian Sastre
ssastre at seaswork.com
Sun Mar 1 18:59:45 UTC 2009
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.
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 :)
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/f3d44ca5/attachment.htm
More information about the Squeak-dev
mailing list
|