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.
> > 2. add wantsBBBHaloHandle to Morph (returning false) > > 3. add method addBBBHandle to HaloMorph (see addScriptorHandle: for an > > example). > > 4. Add wantsBBBHaloHandle method (returning true) and a event handler > > to your Morph > > What do you mean by "event handler", and how do I create one for this? The part in addScriptHandle: .... on: #mouseUp send: #editButtonsScript to: innerTarget #mouseUp is an event and editButtonsScript is a event handler. innerTarget is the morph around which the halo appears. It should have a editButtonsScript method to handle the event. > > See senders and implementors of addScriptorHandle: for an example. > > There does not seem to be any such method. Did you mean addScriptHandle:? Yes. Sorry about the typo. I hope it didn't misdirect you for too long. Subbu _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners