Pardon me for butting in but<div><br></div><div>I am interested in creating a new Class of pop up menu in Pharo</div><div><br></div><div>that doesn't look or act anything like the standard pop up Menus</div><div><br></div><div>and I would like to know where in the Pharo code I can</div><div><br></div><div>get between a </div><div><br></div><div>right click and its pop up Menu opening</div><div><br></div><div>and open up my own MyMenu instead of the standard Menu</div><div><br></div><div>I'm guessing i should start with the Menu Class and maybe</div><div><br></div>make MyMenu be a subClass of Menu?<div><br></div><div>Should i ask questions like this on stack overflow instead?</div><div><br></div><div>It seems to me that the following <font size="2"><span style="background-color:rgba(255,255,255,0)">monticelloChangeSetMenu: </span></font>code is</div><div><br></div><div>Adding an new item mc to aMenu</div><div>finding a different menu item dc in aMenu</div><div>if dc exists</div><div> remove the mc item from aMenu</div><div> and add mc right after dc in aMenu</div><div><br></div><div>I don't know what a </div><div><br></div><div><menu pragma> is</div><div><br></div><div>can you point me at an explanation?</div><div><br></div><div>Does it allow a Method to be selected at runtime</div><div><br></div><div>according to its pragmas?</div><br><div><br><div><br>On Thursday, August 27, 2015, Tobias Pape <<a href="mailto:Das.Linux@gmx.de">Das.Linux@gmx.de</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Eliot,<br>
<br>
On 28.08.2015, at 00:09, <a href="javascript:;" onclick="_e(event, 'cvml', 'commits@source.squeak.org')">commits@source.squeak.org</a> wrote:<br>
<br>
> Item was added:<br>
> + ----- Method: ChangeSorter>>monticelloChangeSetMenu: (in category '*Monticello-changeSet menu') -----<br>
> + monticelloChangeSetMenu: aMenu<br>
> + <changeSetMenuShifted: false><br>
> + <menuPriority: 600><br>
> + "Sigh, when implementing menu pragmas this is not what I had in mind..."<br>
> + aMenu add: 'delete Monticello load change sets' action: #deleteMonticelloChangeSets.<br>
> + (aMenu submorphs<br>
> + detect: [:m| m isMenuItemMorph and: [m contents beginsWith: 'destroy change set']]<br>
> + ifNone: []) ifNotNil:<br>
> + [:destroyItem| | item |<br>
> + aMenu removeMorph: (item := aMenu submorphs last).<br>
> + aMenu addMorph: item after: destroyItem].<br>
> + ^aMenu!<br>
<br>
Can you explain what you want to achieve<br>
and how I can make this more convenient?<br>
<br>
Best regards<br>
-Tobias<br>
<br>
<br>
</blockquote></div></div>