Status: New
Owner: ----
Labels: Type-Enh
New issue 6222 by
[hidden email]: YellowButton Click on Morphs
displaying context menu.
http://code.google.com/p/pharo/issues/detail?id=6222First time posting here, please be patient...and sorry for my english:).
Morphs already has a (useless) <<obj wantsYellowButtonMenu:>> property,
when set to "true", yellowButton stops dragging the object, but no menu
appears.
When <<obj class defaultYellowButtonMenuEnabled:>> set "true",
yellowButton does display the "default context menu".
This behaves the same in 1.3, 1.4 and current 2.0.
Proposed enhacement:
Morph>>addYellowButtonMenuItemsTo: aMenu event: evt
aMenu defaultTarget: self.
self myOwnCustomMenu: aMenu. "ADD THIS LINE HERE"
self defaultYellowButtonMenuEnabled ifFalse: [^ self].
(................)
Morph>>myOwnCustomMenu: aMenu
^aMenu.
Now, when redefining <<myOwnCustomMenu: aMenu>> yellowButton-on-morph shows
custom context menu.
If <<obj class defaultYellowButtonMenuEnabled:>> set "true" Custom menu is
added on top of default menu.
Now we have the menu, but it shows complete <ExternalName> as title, wich
is a little ugly.
Adding <<hideExternalName>> property to Morphs, and a little workarround in
<<Morph-yellowButtonActivity: shiftState>> solved this.
Files are for <Pharo1.3 Latest update: #13315> as
<<Morph-addYellowButtonMenuItemsTo:>> changed in newer versions, but
fix(adding that single line) still works.
Attachments:
Morph-addYellowButtonMenuItemsToevent.st 1.8 KB
Morph-myOwnCustomMenu.st 386 bytes
Morph-yellowButtonActivity.st 956 bytes
Morph-hideExternalName.st 316 bytes
Morph-hideExternalName-1.st 229 bytes
yellowButtonMenu.JPG 93.6 KB
_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker