Hi,



On Sun, Sep 14, 2014 at 10:45 PM, Offray Vladimir Luna Cárdenas <offray@riseup.net> wrote:
Hi Tudor,

On 09/14/2014 01:51 PM, Tudor Girba wrote:
Hi Offray,

I sent this info before, but I am not sure you got it. In order to understand
the concepts of Glamour, you should read the dedicated chapter from the Moose Book:
http://www.themoosebook.org/book/internals/glamour/

I do not have time to get your code to work right now, but the workaround
example I sent earlier should just work once you understand how transmissions work.

Yes In fact I got it, and follow your example and send a several updates and questions[1][2][3] about my attempts to implement your suggestion

[1] http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/2014-September/013423.html
[2] http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/2014-September/013474.html
[3] http://lists.pharo.org/pipermail/pharo-users_lists.pharo.org/2014-September/013553.html

The main conceptual issue I have is that most of the examples I see on the Deep into Pharo and Moose Books on custom browsers are mapping the flow of information in transmissions in one sense from general to particular: packages to classes -> to protocols -> to methods -> to code editor,

This is incorrect. Transmissions handle any data between any ports.
 

but, in my case what I want is to make a two ways communication: from nodes tree to node content and back, so once you have selected a particular node in the tree, the content of the node is shown and once you change the text of that content in this is updated (automatically or explicitly of the first is not possible) in the nodes tree. Sending message to outside seems the way to do it, but I don't know how to send a message that captures all the text in a pane and, as I said in the follow ups of your suggestion a direct implementation of them gets the two panes (nodes tree and node content) disconnected.

You do not send messages. You send data from one port to another, and presentations react to the changes of port values from the panes in which they reside. The outside port is just another port in the surrounding pane. You can choose any port for any pane you want.


Is a general explanation of the issue (details are in the referred messages) but I think than that's the core issue of what I'm trying to do. As I said there, I would love to write the article about this experience on the software itself (I'm calling it Software Selfies :-P), but I hit a wall about this conceptual issue.

In the meantime, I will try to add support for the triggering of custom actions
when ports change more prominently. Please feel free to ask more detailed questions.

Thanks. That are my details until now. Would be nice to have some kind of updateOn message that connects ports on specific events (text pane gets updated, node gets moved or something like that).

For text being updated, you have this. The port is called #text.

Here is an updated example of how to store the text as it is being written by using the block of a transmission:

objectStoringTheText := ''.
tabulator := GLMTabulator new.
tabulator column: #pane.
tabulator transmit 
to: #pane; 
andShow: [ :a | a text ].
tabulator transmit 
from: #pane port: #text; 
to: #pane port: #portIDoNotCareAbout; 
transformed: [ :textComingFromThePresentation | objectStoringTheText := textComingFromThePresentation ].
tabulator openOn: text

In this case, objectStoringTheText is the object with which you can do what you want. In this case, in the transformed: block, I simply store the text in it as an example.

To test this example, just execute the code in a Moose image, then type something, and then inspect objectStoringTheText. You will see that it has the text that you typed.

Is this clearer now?

Cheers,
Doru


 
Cheers,
Doru


Cheers,

Offray



_______________________________________________
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"