[Newbies] custom halos

K. K. Subramaniam subbukk at gmail.com
Thu Oct 2 14:51:29 UTC 2008


On Thursday 02 Oct 2008 6:44:58 am Aidan Gauland wrote:
> Hello,
>
>   I've created a Morph (an indirect subclass of Morph) and I want it to
> have an extra halo for bringing up a special menu (or dialog, or etc.). 
> How can I do this?
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)
  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

See senders and implementors of addScriptorHandle: for an example.

HTH .. Subbu


More information about the Beginners mailing list