Hello list,
I was searching for the right (sustainable) way to extend the browser menu. I searched for the menu labels (show "methods with strings in it" etc.) but couldn't find it, so there must be another hook. Could anyone give me quick pointer? TIA, Markus |
On 05/05/2011 01:45 PM, Markus Fritsche wrote:
> Hello list, > > I was searching for the right (sustainable) way to extend the browser > menu. I searched for the menu labels (show "methods with strings in > it" etc.) but couldn't find it, so there must be another hook. Could > anyone give me quick pointer? > > TIA, > Markus myMenuCommandOn: aBuilder <worldMenu> aBuilder item: #MyStuff myFullScreenMenuCommandOn: aBuilder <worldMenu> (aBuilder item: #'Full Screen') parent: #MyStuff; action: [ DisplayScreen new toggleFullScreen ] Of course, #parent: could also point at an existing menu if you're just adding to what's already there. Doesn't matter where you put these, they're found by the <worldMenu> pragma. -- Ramon Leon http://onsmalltalk.com |
Ramon, I think he is asking about BROWSER menus, that is, extending OB context menu ;)
On Thu, May 5, 2011 at 11:59 PM, Ramon Leon <[hidden email]> wrote:
-- Mariano http://marianopeck.wordpress.com |
Thanks for the worldMenu pragma explanation - I wondered about that
one but not enough to really look into that one yet :) So for the Brower, Browser>>#messageListMenu: aMenu shifted: shifted is the right place to alter the method name context menu - right? Regards, Markus 2011/5/6 Mariano Martinez Peck <[hidden email]>: > Ramon, I think he is asking about BROWSER menus, that is, extending OB > context menu ;) > > On Thu, May 5, 2011 at 11:59 PM, Ramon Leon <[hidden email]> > wrote: >> >> On 05/05/2011 01:45 PM, Markus Fritsche wrote: >>> >>> Hello list, >>> >>> I was searching for the right (sustainable) way to extend the browser >>> menu. I searched for the menu labels (show "methods with strings in >>> it" etc.) but couldn't find it, so there must be another hook. Could >>> anyone give me quick pointer? >>> >>> TIA, >>> Markus >> >> myMenuCommandOn: aBuilder >> <worldMenu> >> aBuilder item: #MyStuff >> >> myFullScreenMenuCommandOn: aBuilder >> <worldMenu> >> (aBuilder item: #'Full Screen') >> parent: #MyStuff; >> action: [ DisplayScreen new toggleFullScreen ] >> >> Of course, #parent: could also point at an existing menu if you're just >> adding to what's already there. Doesn't matter where you put these, they're >> found by the <worldMenu> pragma. >> >> -- >> Ramon Leon >> http://onsmalltalk.com >> > > > > -- > Mariano > http://marianopeck.wordpress.com > > |
In reply to this post by Markus Fritsche-3
I jotted down some notes on how some of the menus are built.
Might be something in there that helps. http://dougedmunds.com/pmwiki.php?n=Pharo.MenuSystem |
In reply to this post by Mariano Martinez Peck
On 05/05/2011 03:25 PM, Mariano Martinez Peck wrote:
> Ramon, I think he is asking about BROWSER menus, that is, extending OB > context menu ;) Oops, my bad, wasn't paying close enough attention I guess. -- Ramon Leon http://onsmalltalk.com |
On Fri, May 6, 2011 at 12:58 AM, Ramon Leon <[hidden email]> wrote:
No problem, it seems it was useful anyway ;) -- Mariano http://marianopeck.wordpress.com |
Free forum by Nabble | Edit this page |