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)? thanks, sebastian |
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 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']
|
In reply to this post by Sebastian Sastre-2
On 01.03.2009, at 04:42, Sebastian Sastre 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)? Choose "reorganize" in the protocol list menu. - Bert - |
In reply to this post by Eliot Miranda-2
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
|
On Sun, Mar 1, 2009 at 10:59 AM, Sebastian Sastre <[hidden email]> wrote:
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 ;)
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
|
Free forum by Nabble | Edit this page |