On 22.04.2010 04:45, Sean P. DeNigris wrote:
I was looking for a SystemNavigator>> allMethodsUsingPragma: aSymbol, or
something like that. With that funtionality, I guess it really wouldn't
matter where they were located - or am I missing an easy way to find these
methods?
Sean
You could try PragmaCollector, which is quite neat.
(PragmaCollector filter: [:pragma | pragma keyword = #worldMenu]) reset
The problem with an allMethodsUsingPragmaWithKeyword: method, would be
that people might think it was ok to use without caution, which it's not :)
[100 timesRepeat: [PragmaCollector allSystemPragmas]] timeToRun 6245
So when using pragmas, a good idea is to either use a PragmaCollector
like a cache (dynamically updated one, that is), or limit the search
scope of the pragmas you accept, usually to a class.
PragmaCollector does not exist in Squeak though, it's one of the pieces
I think they'd find useful too. In fact, currently they have one
implemented in methods on Preferences, in the "dynamic preferences"
category.
Class-scoped pragmas is what is used in VW for menu building.
Cheers,
Henry
_______________________________________________
Pharo-project mailing list
Pharo-project@lists.gforge.inria.fr
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project