Igor made this comment in relation to this thread.
indeed. I wonder why you (Frank) need such complicated way for doing things. If you need a reusable piece of code, which you want to use more than 1 time, classes is the best placeholder for them..
Even if you put things at class side, it helps a lot.. so then you can just type:
MyUtilsClass doThis
MyUtilsClass doThat
When I was creating the script to automatically add instance variables and accessors Stack Overflow 14234003, Mef mentioned that if rather than run the method against an instance of an object, I could attach the method to a class, namely ClassDescription.
You could add it to ClassDescription itself, then you wouldn't even have to pass the class as parameter (because self is the class then). You could call ClassX addVariablesNamed: aCollection in this case
Is ClassX an example of the MyUtils class Igor mentions? I tried that option using ClassDescription but got an MNU error.. e.g. right now I use the first option in this manner: | anyVariable | anyVariable := ClassType new. anyVariable addVarsAndTheirAccessors: #('aaaa' 'bbbb' 'cccc') How would I attach the method to a utilities class and ClassDescription for that matter as it would then apply to all classes? -- Frank Church ======================= http://devblog.brahmancreations.com