I am having trouble finding examples of how to bring up my own right-click context menus. I am guessing that I want CustomMenu for the menu itself, but how do I hook it up to the right-click button? I cannot seem to catch the right- click (umm..yellowButton) event. Thanks! Robert
On Sunday 12 Jul 2009 11:40:13 pm Robert Lamb wrote:
I am having trouble finding examples of how to bring up my own right-click context menus. I am guessing that I want CustomMenu for the menu itself, but how do I hook it up to the right-click button? I cannot seem to catch the right- click (umm..yellowButton) event
Have you looked at doYellowButtonPress:, hasYellowButtonMenu methods?
Subbu
K. K. Subramaniam <subbukk <at> gmail.com> writes:
On Sunday 12 Jul 2009 11:40:13 pm Robert Lamb wrote:
I am having trouble finding examples of how to bring up my own right-click context menus. I am guessing that I want CustomMenu for the menu itself, but how do I hook it up to the right-click button? I cannot seem to catch the right- click (umm..yellowButton) event
Have you looked at doYellowButtonPress:, hasYellowButtonMenu methods?
Subbu
Subbu, thanks for the reply! I see the hasYellowButtonMenu method, but not the other. Problem is I cannot figure out how to hook it all up and am looking for an example or a link to an example or more info. Thanks!
On Tuesday 14 Jul 2009 1:23:16 am Robert Lamb wrote:
K. K. Subramaniam <subbukk <at> gmail.com> writes:
Have you looked at doYellowButtonPress:, hasYellowButtonMenu methods?
I see the hasYellowButtonMenu method, but not the other. Problem is I cannot figure out how to hook it all up and am looking for an example or a link to an example or more info.
Which version of Squeak are you using? I see TextPlusMorph>>doYellowButtonPress. The version history shows it was added by update 2001trnMisc11May08-KR (Karl Ramberg?).
You can also see the methods ParagraphEditor class>>initializeTextEditorMenus for examples on how to add custom entries. When yellow button is pressed, MouseMenuController queries this menu through getPluggableYellowButtonMenu and then sends the model:orSendTo: message to it. You can trace through these calls.
Subbu
beginners@lists.squeakfoundation.org