Issue 653 in moose-technology: [Glamour] GLMBasicExamples>>staticAndDynamicMenu presents not working actions

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

Issue 653 in moose-technology: [Glamour] GLMBasicExamples>>staticAndDynamicMenu presents not working actions

moose-technology
Status: Accepted
Owner: [hidden email]
Labels: Type-Defect Priority-Medium Component-Glamour

New issue 653 by [hidden email]: [Glamour]  
GLMBasicExamples>>staticAndDynamicMenu presents not working actions
http://code.google.com/p/moose-technology/issues/detail?id=653

0) open a transcript
1) execute: 'GLMBasicExamples open'
2) select 'Menus' (this is populated by the #staticAndDynamicMenu method)
3) go to the 'Text' tab
4) select some text (e.g., 'Character')
5) right click on the text and choose 'Print selection'

you would expect 'Character' to be printed but 'nil' is printed instead. If  
you then go to the 'List' tab, select a letter and repeat the process from  
step 3, you will get this letter printed in the transcript. I would have  
expected the selected text to be printed.


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Issue 653 in moose-technology: [Glamour] GLMBasicExamples>>staticAndDynamicMenu presents not working actions

moose-technology
Updates:
        Status: Verified

Comment #1 on issue 653 by [hidden email]: [Glamour]  
GLMBasicExamples>>staticAndDynamicMenu presents not working actions
http://code.google.com/p/moose-technology/issues/detail?id=653

Name: Glamour-Examples-DamienCassou.187
Author: DamienCassou
Time: 26 June 2011, 12:47:50 pm
UUID: d81f2303-5ccd-4bd8-b3c1-460d6d8b282c
Ancestors: Glamour-Examples-cyrilledelaunay.186

- Issue 653: displays the selected text in the transcript, not the result  
of the #selection port

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Issue 653 in moose-technology: [Glamour] GLMBasicExamples>>staticAndDynamicMenu presents not working actions

moose-technology

Comment #2 on issue 653 by [hidden email]: [Glamour]  
GLMBasicExamples>>staticAndDynamicMenu presents not working actions
http://code.google.com/p/moose-technology/issues/detail?id=653

Ok, I fixed it by changing the action from

dynamicActionsOnSelection: [:text | ... action: [Transcript show: text  
selection]; ... ];

to

dynamicActionsOnSelection: [:text | ... action: [Transcript show: text  
selectedText]; ... ];


However, I'm not sure about the behavior of #selection which currently  
returns what is selected in the list presentation instead of the text  
presentation. Please check this before closing the report.

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Issue 653 in moose-technology: [Glamour] GLMBasicExamples>>staticAndDynamicMenu presents not working actions

moose-technology
Updates:
        Cc: [hidden email] [hidden email]

Comment #3 on issue 653 by [hidden email]: [Glamour]  
GLMBasicExamples>>staticAndDynamicMenu presents not working actions
http://code.google.com/p/moose-technology/issues/detail?id=653

(No comment was entered for this change.)

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Issue 653 in moose-technology: [Glamour] GLMBasicExamples>>staticAndDynamicMenu presents not working actions

moose-technology

Comment #4 on issue 653 by [hidden email]: [Glamour]  
GLMBasicExamples>>staticAndDynamicMenu presents not working actions
http://code.google.com/p/moose-technology/issues/detail?id=653

A TextPresentation does not populate the #selection port automatically. The  
reason is that typically, the #selection port is used as a shortcut to  
connect two panes, but in the case of a text presentation we typically want  
to select a piece of text and trigger some action based on it. Thus from a  
usability point of view, it is not the selection that should trigger the  
population of #selection, but the action.

This is why we populate #selectionText by default.

Does this help?

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: Issue 653 in moose-technology: [Glamour] GLMBasicExamples>>staticAndDynamicMenu presents not working actions

moose-technology
Updates:
        Status: Fixed

Comment #5 on issue 653 by [hidden email]: [Glamour]  
GLMBasicExamples>>staticAndDynamicMenu presents not working actions
http://code.google.com/p/moose-technology/issues/detail?id=653

Helps a lot. So I guess my fix was correct in replacing #selection by  
#selectedText. I close the issue.

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev