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