Newbie Morphic Menu Question

Kevin Fisher kgf at golden.net
Mon Aug 28 23:44:28 UTC 2000


Sorry for the newbie question...I've done some poking around in various 
documentation caches on the main Swiki and I've had no luck answering this 
question...

I've been looking at how popup menus are done in Morphic, specifically using 
Celeste as an example.  I was finishing up my enhancements to the 
CelesteComposition class, where I had added a simple menu to the main 
PluggableTextMorph (I added cut/copy/paste).  For laughs, I decided to add a 
menu entry for adding attachments (yes, I know there's a button for it at the 
top!).

The problem is, when I activated this menu item, I get 'message not found'.  
Upon inspection with the debugger I noticed that the #addAttachment message 
gets sent to the PluggableTextMorph, not the Model 'CelesteComposition'.

My question is...how is this different from other popup menus?  From what I 
can tell, popups in the main Celeste window (ie in the Category pane, for 
example) all call selectors in the main Model (Celeste), not in the list morph 
the menu is attached to.

I got the 'hint' from the comment in Model>>perform:orSendTo: that text 
editing morphs are treated differently...is this true?  If the menu is opened 
on a text morph, do the messages get sent to the text morph instead of the 
Model?






More information about the Squeak-dev mailing list