You are facing the nonOOP aspect of certain ugly parts of queak.
The fact that halosmorph cannot be defined per class is striking. Nice
to have a kind of global var, this is were squeak lost OOP.
Once someone fixed that but it was never integrated (probably in 3.7
or 3.8 days).
For my book I wanted special halos and I had to hack the global
system. :(
Terribly sad.
Stef
On Oct 6, 2008, at 12:24 AM, Aidan Gauland wrote:
K. K. Subramaniam wrote:
On Saturday 04 Oct 2008 10:55:28 am Aidan Gauland wrote:
K. K. Subramaniam wrote:
For adding a new button called BBB, you need to
1. add a halospec for addBBBHandle to Preferences class (see
senders of
addScriptorHandle: for the list)
How can I do (and undo) this programmatically?
I don't know of any simple way to do this. The specs are in a
method, not in a global variable. So you will have to recompile the
method to add new specs.
I think I might have found out how: run
PreferencesClass>>installHaloSpecsFromArray: passing it an array in
the same format as the one that Preferences class>>customHaloSpecs
or PreferencesClass>>classicHaloSpecs retruns.
This way, you can include halos in a package. (I think, I don't
know about removing them later.)
Thanks for the pointers (or references, in Smalltalk).
-Aidan
_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners
_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners