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@gmx.de wrote:
Hi Eliot,
On 28.08.2015, at 00:09, commits@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