Hi,

As I said before, right now, Glamour does not easily the behavior you want,
but you can abuse an existing mechanism of capturing changes of a port
through a transmission that transforms that value.

Here is an example:

text := ''.
GLMCompositePresentation new wrapper
with: [ :wrapper |
wrapper show: [ :a |
a text ].
wrapper transmit fromOutsidePort: #text; toOutsidePort:
#portIDoNotCareAbout; transformed: [ :textComingFromThePresentation | text
:= textComingFromThePresentation ] ];
openOn: text

In this example, we create a transmission that originates in the #text port
that will be populated every time you modify something. This transmission
sends the value to #portIDoNotCareAbout only to have access to the
transformation block where you can do what you want with the
textComingFromThePresentation.

To check the behavior:
- execute the code in a Playground,
- type something in the text area that opens,
- inspect the text variable
==> you will see that it contains the latest contents from the text editor

We should promote this mechanism explicitly in Glamour, but in the meantime
it is probably sufficient for your case.

Doru


On Wed, Sep 3, 2014 at 4:47 AM, Offray Vladimir Luna Cárdenas <
off...@riseup.net> wrote:

> Hi,
>
> I'm trying to restate my question to see if I have more luck with any
> answer this time.
>
> I'm making advances with an outliner like app for writing and now I can
> add nodes move them and store them in the really nice STON format. But
> because information on trees is not editable, I would like to try another
> approach: To create an emergent window and put the node tree and node tags
> on it, and the update the this values on the tree node.
> Also, I would like to update some objects from the a Glamour text pane,
> without any special button or action, just while I'm writing on them. If
> this is not possible which is the message to select all text in a body
> panel and to send it to a object?
>
> I will be doing some further advances by my own and keep you posted (may
> be with some more specific/better questions on how to get this behaviour
> from Moose browsers).
>
> Cheers,
>
> Offray
>
>


-- 
www.tudorgirba.com

"Every thing has its own flow"

Reply via email to