[squeak-dev] The Trunk: Monticello-eem.617.mcz

Kjell Godo squeaklist at gmail.com
Fri Aug 28 08:35:48 UTC 2015


Pardon me for butting in but

I am interested in creating a new   Class of pop up menu   in Pharo

that doesn't look or act anything like the standard pop up Menus

and I would like to know where in the Pharo code I can

get between a

right click   and its    pop up Menu opening

and open up my own MyMenu instead of the standard Menu

I'm guessing i should start with the Menu Class and maybe

make MyMenu be a subClass of Menu?

Should i ask questions like this on stack overflow instead?

It seems to me that the following   monticelloChangeSetMenu:   code is

Adding an new item mc to aMenu
finding a different menu item dc in aMenu
if dc exists
      remove the mc item from aMenu
      and add mc right after dc in aMenu

I don't know what a

<menu pragma> is

can you point me at an explanation?

Does it allow a Method to be selected at runtime

according to its pragmas?



On Thursday, August 27, 2015, Tobias Pape <Das.Linux at gmx.de> wrote:

> Hi Eliot,
>
> On 28.08.2015, at 00:09, commits at source.squeak.org <javascript:;> wrote:
>
> > Item was added:
> > + ----- Method: ChangeSorter>>monticelloChangeSetMenu: (in category
> '*Monticello-changeSet menu') -----
> > + monticelloChangeSetMenu: aMenu
> > +     <changeSetMenuShifted: false>
> > +     <menuPriority: 600>
> > +     "Sigh, when implementing menu pragmas this is not what I had in
> mind..."
> > +     aMenu add: 'delete Monticello load change sets' action:
> #deleteMonticelloChangeSets.
> > +     (aMenu submorphs
> > +                                             detect: [:m| m
> isMenuItemMorph and: [m contents beginsWith: 'destroy change set']]
> > +                                             ifNone: []) ifNotNil:
> > +             [:destroyItem| | item |
> > +             aMenu removeMorph: (item := aMenu submorphs last).
> > +             aMenu addMorph: item after: destroyItem].
> > +     ^aMenu!
>
> Can you explain what you want to achieve
> and how I can make this more convenient?
>
> Best regards
>         -Tobias
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150828/b30af5c8/attachment.htm


More information about the Squeak-dev mailing list