The Inbox: Morphic-cmfcmf.1496.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: Morphic-cmfcmf.1496.mcz

commits-2
A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-cmfcmf.1496.mcz

==================== Summary ====================

Name: Morphic-cmfcmf.1496
Author: cmfcmf
Time: 1 August 2019, 6:57:12.047202 pm
UUID: 34f7313a-f70a-3542-bd4d-9657b63cd95e
Ancestors: Morphic-mt.1495

Use MenuMorph>>popUpEvent:in: instead of not existing MenuMorph>>openAt: when yellow button clicking on a TextAttribute with >>menu defined.

=============== Diff against Morphic-mt.1495 ===============

Item was changed:
  ----- Method: TextEditor>>yellowButtonDown: (in category 'events') -----
  yellowButtonDown: event
  "Process a yellow button event. Answer true if the event was handled, false otherwise."
  (paragraph attributesAt: event cursorPoint) do:[:attr|
  attr menu ifNotNil:[
+ attr menu
+ setInvokingView: self morph editView;
+ popUpEvent: event in: self morph world.
- attr menu openAt: event cursorPoint.
  ^true]].
  ^false!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Morphic-cmfcmf.1496.mcz

cmfcmf
Hi everyone,

I noticed that defining >>menu on a TextAttribute is currently not working, because the TextEditor tries to call >>openAt: on the MenuMorph returned by >>menu. I suppose >>openAt: is an old method that no longer exists?
I updated the code to use the >>popUpEvent:in:method instead. I have attached a sample text attribute that shows the menu behaviour. Open it by doit'ing "MyTextAttribute example". If you yellow click on "HERE" in the opened textbox, the menu will appear.
I was not 100% sure what to set as the invoking view – "self model", "self morph" or "self morph editView". Let me know what you think about my choice of "self morph editView".

Best,
Christian

Am Do., 1. Aug. 2019 um 18:58 Uhr schrieb <[hidden email]>:
A new version of Morphic was added to project The Inbox:
http://source.squeak.org/inbox/Morphic-cmfcmf.1496.mcz

==================== Summary ====================

Name: Morphic-cmfcmf.1496
Author: cmfcmf
Time: 1 August 2019, 6:57:12.047202 pm
UUID: 34f7313a-f70a-3542-bd4d-9657b63cd95e
Ancestors: Morphic-mt.1495

Use MenuMorph>>popUpEvent:in: instead of not existing MenuMorph>>openAt: when yellow button clicking on a TextAttribute with >>menu defined.

=============== Diff against Morphic-mt.1495 ===============

Item was changed:
  ----- Method: TextEditor>>yellowButtonDown: (in category 'events') -----
  yellowButtonDown: event
        "Process a yellow button event. Answer true if the event was handled, false otherwise."
        (paragraph attributesAt: event cursorPoint) do:[:attr|
                attr menu ifNotNil:[
+                       attr menu
+                               setInvokingView: self morph editView;
+                               popUpEvent: event in: self morph world.
-                       attr menu openAt: event cursorPoint.
                        ^true]].
        ^false!





MyTextAttribute.st (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Morphic-cmfcmf.1496.mcz

cmfcmf
Hi everyone,

has someone had the time to check this patch out yet?

Best,
Christian



--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html

Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Morphic-cmfcmf.1496.mcz

marcel.taeumel
I just did and merged it. :-)

Best,
Marcel

Am 22.08.2019 14:50:00 schrieb cmfcmf <[hidden email]>:

Hi everyone,

has someone had the time to check this patch out yet?

Best,
Christian



--
Sent from: http://forum.world.st/Squeak-Dev-f45488.html