Hi Sam,

First of all thank you for your mail and your enthusiasm. It is exciting to see Moose getting used in unexpected contexts. Could you tell us more about your project? Also, what prompted you to choose Moose?


You are raising a good question.

First, you do not need to create a whole pane to get a new port. Second, you can use a simple transmission that does not show anything. So, your code would be:
browser := GLMTabulator new.
browser row:#numbers.
browser transmit to: #numbers; andShow:[:a| a list display:[:n| 1to: n]].
browser transmit 
to: #numbers port: #x; 
from: #numbers port: #strongSelection; 
when: [ :x | x notNil ];
transformed:[:x| 
x explore. 
((browser paneNamed: #numbers) port: #strongSelection) value: nil ].
browser openOn: 10.


But, the use case is not supported in Glamour explicitly. The reason is that we wanted to focus on data flow rather than on supporting all user interactions possible. So, in your case, if the only thing you want to do is open an explorer, you can see the problem in a different way and instead of wanting to open a window, you pass the value to some pane that happens to show an inspector.

For such a use case, there exist an undervalued feature in Glamour called the Watcher. Try this:

browser := GLMTabulator new.
browser row:#numbers.
browser transmit to: #numbers; andShow:[:a| a list display:[:n| 1to: n]].
browser transmit 
toWatcher; 
from: #numbers port: #strongSelection; 
andShow: [:a :x| a custom: GTInspector new ].
browser openOn: 10.

And then press "Character space command shift" to toggle the Watcher window. You will get a preview window similar to the one on Mac, and if you double click on your list of numbers, the inspector will appear in the watcher (see the attached picture).

As you can see, we turn the problem around a bit. Let me know if it fits your needs.
Inline image 1
Cheers,
Doru



On Wed, Sep 11, 2013 at 4:17 PM, Sam Adams <ssadams@us.ibm.com> wrote:

First, THANKS FOR BREATHING NEW LIFE INTO SMALLTALK!!!!!

We've adopted Pharo/Moose/et.al. for a major project in IBM Research, and as a 29-year Smalltalk veteran, I am simply blown away by all the extreme functionality the community has developed.
In getting used to Glamour, I found a need for a doubleClick action, but the only examples and APIs I could locate used the transmission to update another pane.  I worked out how to do what I need using a "hidden pane", but its an awkward hack.  What I would really like is a strongSelectionAct: but I haven't learned enough of the infrastructure to add it myself.
I also found that once you doubleClick an unselected list item, it launches the action, selects the list item, but then you can't doubleClick it again for another action.  I found a solution by resetting the port value.

Here's the code that works.

browser := GLMTabulator new.
browser row:#numbers; row:#numbersDoubleClick size:0.1.
browser transmit to: #numbers; andShow:[:a| a list display:[:n| 1to: n]].
browser transmit to: #numbersDoubleClick; from: #numbers port:#strongSelection;
andShow:[:x| (browser portValueAt: (#numbers->#strongSelection)) explore.
browser portValueAt: (#numbers->#strongSelection) put: nil].
browser openOn: 10.

Is there a better way?

Regards,
Sam


Sam S. Adams, CTO - Contextual Computing
IBM Distinguished Engineer, IBM Research
Mobile: 919-696-6064, email: ssadams@us.ibm.com
Assistant: Linda R. Morrison. (720) 395-0460 Fax: (845) 491-4318, Tie: 676-0460, linda.r.morrison@us.ibm.com
<<Hebrews 11:6, Proverbs 3:5-6, Romans 1:16-17, 1 Corinthians 1:10>>


_______________________________________________
Moose-dev mailing list
Moose-dev@iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev




--
www.tudorgirba.com

"Every thing has its own flow"