Squeak context menus

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Squeak context menus

Robert Lamb-2
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

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Squeak context menus

K. K. Subramaniam
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

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Squeak context menus

Robert Lamb-2
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!

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Re: Squeak context menus

K. K. Subramaniam
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 mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners