Hi,
Despite of my advances studying Glamorous Toolkit and making some advances on "apps" and interfaces, I really don't understand well the concept of ports and auto-update of values. So I started with a small excercise from the transcript example as proposed in the GT blog[1]. Its working as expected, so try to extend the example with a code that shows my incomplete understanding at [2]. My idea was to create a two panels browser showing an array. Left panel show a list, and right one was a text with the selected value of the list. When the values at the right were updated the list at the left was updated also. Because this was not working I create a Transcript trying to show if changes on the right where captured. I have seen the three inter-dependant panes example, but still I don't get it right. So my questions are:
[1] http://ws.stfx.eu/L277ESMZYIF3 [2] http://ws.stfx.eu/1FOA0OWJ8PWA
a) How can I send the changes in values from the right panel to the one of the left?
Thanks,
Offray
Hi,
The first problem I see is that you look for the change of port in the browser, not in the text presentation.
Try by adding onChangeOfPort: inside the text presentation creation block.
Here is a full snippet for that: http://ws.stfx.eu/GDZ3ZIZ0GMTM
Cheers, Doru
On Thu, Dec 4, 2014 at 12:16 AM, Offray Vladimir Luna Cárdenas < offray@riseup.net> wrote:
Hi,
Despite of my advances studying Glamorous Toolkit and making some advances on "apps" and interfaces, I really don't understand well the concept of ports and auto-update of values. So I started with a small excercise from the transcript example as proposed in the GT blog[1]. Its working as expected, so try to extend the example with a code that shows my incomplete understanding at [2]. My idea was to create a two panels browser showing an array. Left panel show a list, and right one was a text with the selected value of the list. When the values at the right were updated the list at the left was updated also. Because this was not working I create a Transcript trying to show if changes on the right where captured. I have seen the three inter-dependant panes example, but still I don't get it right. So my questions are:
[1] http://ws.stfx.eu/L277ESMZYIF3 [2] http://ws.stfx.eu/1FOA0OWJ8PWA
a) How can I send the changes in values from the right panel to the one of the left?
Thanks,
Offray _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
2014-12-04 7:17 GMT+01:00 Tudor Girba tudor@tudorgirba.com:
Hi,
The first problem I see is that you look for the change of port in the browser, not in the text presentation.
Try by adding onChangeOfPort: inside the text presentation creation block.
Here is a full snippet for that: http://ws.stfx.eu/GDZ3ZIZ0GMTM
Cheers, Doru
On Thu, Dec 4, 2014 at 12:16 AM, Offray Vladimir Luna Cárdenas < offray@riseup.net> wrote:
Hi,
Despite of my advances studying Glamorous Toolkit and making some advances on "apps" and interfaces, I really don't understand well the concept of ports and auto-update of values. So I started with a small excercise from the transcript example as proposed in the GT blog[1]. Its working as expected, so try to extend the example with a code that shows my incomplete understanding at [2]. My idea was to create a two panels browser showing an array. Left panel show a list, and right one was a text with the selected value of the list. When the values at the right were updated the list at the left was updated also. Because this was not working I create a Transcript trying to show if changes on the right where captured. I have seen the three inter-dependant panes example, but still I don't get it right. So my questions are:
[1] http://ws.stfx.eu/L277ESMZYIF3 [2] http://ws.stfx.eu/1FOA0OWJ8PWA
a) How can I send the changes in values from the right panel to the one of the left?
Thanks,
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"
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
The real problems might be, - how to access the list, that is used by the left presentation and - how to access the selected *index* of the list, so he can do a at:put: on that data
btw, changing the text of the text pane *and* accepting the text on the text pane (cmd+s) both trigger a change-event. Maybe it would be better to distinguish between both actions.
nicolai
Hi,
On Thu, Dec 4, 2014 at 3:35 PM, Nicolai Hess nicolaihess@web.de wrote:
2014-12-04 7:17 GMT+01:00 Tudor Girba tudor@tudorgirba.com:
Hi,
The first problem I see is that you look for the change of port in the browser, not in the text presentation.
Try by adding onChangeOfPort: inside the text presentation creation block.
Here is a full snippet for that: http://ws.stfx.eu/GDZ3ZIZ0GMTM
Cheers, Doru
On Thu, Dec 4, 2014 at 12:16 AM, Offray Vladimir Luna Cárdenas < offray@riseup.net> wrote:
Hi,
Despite of my advances studying Glamorous Toolkit and making some advances on "apps" and interfaces, I really don't understand well the concept of ports and auto-update of values. So I started with a small excercise from the transcript example as proposed in the GT blog[1]. Its working as expected, so try to extend the example with a code that shows my incomplete understanding at [2]. My idea was to create a two panels browser showing an array. Left panel show a list, and right one was a text with the selected value of the list. When the values at the right were updated the list at the left was updated also. Because this was not working I create a Transcript trying to show if changes on the right where captured. I have seen the three inter-dependant panes example, but still I don't get it right. So my questions are:
[1] http://ws.stfx.eu/L277ESMZYIF3 [2] http://ws.stfx.eu/1FOA0OWJ8PWA
a) How can I send the changes in values from the right panel to the one of the left?
Thanks,
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"
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
The real problems might be,
- how to access the list, that is used by the left presentation and
Why do you need that? You typically need something from that list and if you need that you pass it along in the transmission.
Any transmission can have multiple from: clauses specified and in doing so you get the values of those ports in the block.
- how to access the selected *index* of the list, so he can do a at:put: on
that data
That is not possible.
btw, changing the text of the text pane *and* accepting the text on the text pane (cmd+s) both trigger a change-event. Maybe it would be better to distinguish between both actions.
Funny. I did not see this one. This is a bug.
Cheers, Doru
nicolai
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Hi :),
Comments inlined below
El 04/12/14 a las 09:48, Tudor Girba escribió:
On Thu, Dec 4, 2014 at 3:35 PM, Nicolai Hess <nicolaihess@web.de mailto:nicolaihess@web.de> wrote:
[...]
The real problems might be, - how to access the list, that is used by the left presentation and
Why do you need that? You typically need something from that list and if you need that you pass it along in the transmission. Any transmission can have multiple from: clauses specified and in doing so you get the values of those ports in the block.
Well I need particular values on the list. So this part is almost solved.
- how to access the selected *index* of the list, so he can do a at:put: on that data
That is not possible.
For the moment I'm thinking in 'indexOf: value' and then replacing the current selection with "at: put:" using that result. Once I have this two instructions I would like to update the selected value on the list with the current textPresentation value in a similar way to what is done with the Transcript. This is a workaround for the direct writing of values in list/trees inside GT Moose, but I think that this could work. I would make some test about this idea and keep you posted.
Cheers,
Offray
If you only want to update the selection, what you need to do is to: - populate a port in the right pane with the value you want to set as selection, and - create a transmission that links that port with the selection port of the left pane.
Here is a working example: http://ws.stfx.eu/K6QW6B8FKGAK
To play with it: - select a - then press the play button on the right pane ==> b gets selected in the first pane.
Cheers, Doru
On Fri, Dec 5, 2014 at 12:20 AM, Offray Vladimir Luna Cárdenas < offray@riseup.net> wrote:
Hi :),
Comments inlined below
El 04/12/14 a las 09:48, Tudor Girba escribió:
On Thu, Dec 4, 2014 at 3:35 PM, Nicolai Hess <nicolaihess@web.de
mailto:nicolaihess@web.de> wrote:
[...]
The real problems might be, - how to access the list, that is used by the left presentation and
Why do you need that? You typically need something from that list and if you need that you pass it along in the transmission. Any transmission can have multiple from: clauses specified and in doing so you get the values of those ports in the block.
Well I need particular values on the list. So this part is almost solved.
- how to access the selected *index* of the list, so he can do a
at:put: on that data
That is not possible.
For the moment I'm thinking in 'indexOf: value' and then replacing the current selection with "at: put:" using that result. Once I have this two instructions I would like to update the selected value on the list with the current textPresentation value in a similar way to what is done with the Transcript. This is a workaround for the direct writing of values in list/trees inside GT Moose, but I think that this could work. I would make some test about this idea and keep you posted.
Cheers,
Offray
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Thanks Doru,
Surely this is something I will use in my Grafoscopio project and if fact was a question I was to ask. If fact, what if I want to go to the next value of the list, not just from a or c to b, but from a to b and from b to c? How the code must be changed?
Looking at your code my question about ports is clearer. When you say:
andShow: [:v | v text populate: #myWantedSelection icon: GLMUIThemeExtraIcons glamorousPlay entitled: 'Update my wanted selection' with: [ #b ] ].
v is what kind of object? and "populate:" is defining a new port?
In this part:
browser transmit from: #right port: #myWantedSelection; to: #left port: #selection.
what is a port? a piece of interface? for example the selection?
My current question is more about changing the value on the right panel and getting it auto-updated in the left one. In another post of this thread I have updated my advances and questions.
Thanks,
Offray
El 04/12/14 a las 18:50, Tudor Girba escribió:
If you only want to update the selection, what you need to do is to:
- populate a port in the right pane with the value you want to set as selection, and
- create a transmission that links that port with the selection port of the left
pane.
Here is a working example: http://ws.stfx.eu/K6QW6B8FKGAK
To play with it:
- select a
- then press the play button on the right pane
==> b gets selected in the first pane.
Cheers, Doru
On Fri, Dec 5, 2014 at 12:20 AM, Offray Vladimir Luna Cárdenas <offray@riseup.net mailto:offray@riseup.net> wrote:
Hi :), Comments inlined below El 04/12/14 a las 09:48, Tudor Girba escribió: On Thu, Dec 4, 2014 at 3:35 PM, Nicolai Hess <nicolaihess@web.de <mailto:nicolaihess@web.de> <mailto:nicolaihess@web.de <mailto:nicolaihess@web.de>>> wrote: [...] The real problems might be, - how to access the list, that is used by the left presentation and Why do you need that? You typically need something from that list and if you need that you pass it along in the transmission. Any transmission can have multiple from: clauses specified and in doing so you get the values of those ports in the block. Well I need particular values on the list. So this part is almost solved. - how to access the selected *index* of the list, so he can do a at:put: on that data That is not possible. For the moment I'm thinking in 'indexOf: value' and then replacing the current selection with "at: put:" using that result. Once I have this two instructions I would like to update the selected value on the list with the current textPresentation value in a similar way to what is done with the Transcript. This is a workaround for the direct writing of values in list/trees inside GT Moose, but I think that this could work. I would make some test about this idea and keep you posted. Cheers, Offray _________________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch <mailto:Moose-dev@iam.unibe.ch> https://www.iam.unibe.ch/__mailman/listinfo/moose-dev <https://www.iam.unibe.ch/mailman/listinfo/moose-dev>
-- www.tudorgirba.com http://www.tudorgirba.com
"Every thing has its own flow"
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Hi,
On Fri, Dec 5, 2014 at 2:34 AM, Offray Vladimir Luna Cárdenas < offray@riseup.net> wrote:
Thanks Doru,
Surely this is something I will use in my Grafoscopio project and if fact was a question I was to ask. If fact, what if I want to go to the next value of the list, not just from a or c to b, but from a to b and from b to c? How the code must be changed?
Looking at your code my question about ports is clearer. When you say:
andShow: [:v | v text populate: #myWantedSelection icon: GLMUIThemeExtraIcons glamorousPlay entitled: 'Update my wanted selection' with: [ #b ] ].
v is what kind of object? and "populate:" is defining a new port?
If you want to find answers to questions like this, simply put a halt in the code :)
"v" is something you named. I just edited your code. "v" will be an instance of GLMCompositePresentation.
In this part:
browser transmit from: #right port: #myWantedSelection; to: #left port: #selection.
what is a port? a piece of interface? for example the selection?
A port is a place where some value is stored and it is ports that get linked when you create a transmission.
Look here: http://www.themoosebook.org/book/internals/glamour/transmissions
A useful way to think of browsers is via a graphical notation. See here (the little bubble is a port): http://www.themoosebook.org/book/internals/glamour/sketching
My current question is more about changing the value on the right panel and getting it auto-updated in the left one. In another post of this thread I have updated my advances and questions.
I do not understand. Is my example not answering your question?
Cheers, Doru
Thanks,
Offray
El 04/12/14 a las 18:50, Tudor Girba escribió:
If you only want to update the selection, what you need to do is to:
- populate a port in the right pane with the value you want to set as
selection, and
- create a transmission that links that port with the selection port of
the left pane.
Here is a working example: http://ws.stfx.eu/K6QW6B8FKGAK
To play with it:
- select a
- then press the play button on the right pane
==> b gets selected in the first pane.
Cheers, Doru
On Fri, Dec 5, 2014 at 12:20 AM, Offray Vladimir Luna Cárdenas <offray@riseup.net mailto:offray@riseup.net> wrote:
Hi :), Comments inlined below El 04/12/14 a las 09:48, Tudor Girba escribió: On Thu, Dec 4, 2014 at 3:35 PM, Nicolai Hess <nicolaihess@web.de <mailto:nicolaihess@web.de> <mailto:nicolaihess@web.de <mailto:nicolaihess@web.de>>> wrote: [...] The real problems might be, - how to access the list, that is used by the left
presentation and
Why do you need that? You typically need something from that
list and if you need that you pass it along in the transmission. Any transmission can have multiple from: clauses specified and in doing so you get the values of those ports in the block.
Well I need particular values on the list. So this part is almost
solved.
- how to access the selected *index* of the list, so he
can do a at:put: on that data
That is not possible. For the moment I'm thinking in 'indexOf: value' and then replacing
the current selection with "at: put:" using that result. Once I have this two instructions I would like to update the selected value on the list with the current textPresentation value in a similar way to what is done with the Transcript. This is a workaround for the direct writing of values in list/trees inside GT Moose, but I think that this could work. I would make some test about this idea and keep you posted.
Cheers, Offray _________________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch <mailto:Moose-dev@iam.unibe.ch> https://www.iam.unibe.ch/__mailman/listinfo/moose-dev <https://www.iam.unibe.ch/mailman/listinfo/moose-dev>
-- www.tudorgirba.com http://www.tudorgirba.com
"Every thing has its own flow"
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Hi,
Thanks for your answers, I'm now checking your links. About your last question:
El 05/12/14 a las 08:28, Tudor Girba escribió:
My current question is more about changing the value on the right panel and getting it auto-updated in the left one. In another post of this thread I have updated my advances and questions.
I do not understand. Is my example not answering your question?
No, is not. Your example shows how to change the selection in the left panel from the right panel. I want to change the value of the left panel by writing to the right one. I don't know if this explains better.
Cheers,
Offray
Can you give me an example of what you want to achieve? Not a code example, a user example.
Cheers, Doru
On Fri, Dec 5, 2014 at 3:43 PM, Offray Vladimir Luna Cárdenas < offray@riseup.net> wrote:
Hi,
Thanks for your answers, I'm now checking your links. About your last question:
El 05/12/14 a las 08:28, Tudor Girba escribió:
My current question is more about changing the value on the right
panel and getting it auto-updated in the left one. In another post of this thread I have updated my advances and questions.
I do not understand. Is my example not answering your question?
No, is not. Your example shows how to change the selection in the left panel from the right panel. I want to change the value of the left panel by writing to the right one. I don't know if this explains better.
Cheers,
Offray
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Hi,
My idea came with the auto-update feature of the Transcript.
Imagine I have this two panes browser. Left show a list with values, non editable. Right shows the selected value on the right as text and the user can write on it. Suppose I selected the 'a' value on the left list and start to write on the right panel changing, the 'a' value for 'this is a test' and get the selected value changed in real time via auto-update on the left panel, without any explicit button or event except for the writing itself.
It's a way to circumvent the fact that list/trees are not editable directly and use panels, ports, transmissions and auto-update to get changes reflected in real time.
Still don't know if I'm explaining myself better (its kind of a deja-vu as a newbie in this community) but let me know how can I made this user example better.
El 05/12/14 a las 09:47, Tudor Girba escribió:
Can you give me an example of what you want to achieve? Not a code example, a user example.
Cheers, Doru
On Fri, Dec 5, 2014 at 3:43 PM, Offray Vladimir Luna Cárdenas <offray@riseup.net mailto:offray@riseup.net> wrote:
Hi, Thanks for your answers, I'm now checking your links. About your last question: El 05/12/14 a las 08:28, Tudor Girba escribió: My current question is more about changing the value on the right panel and getting it auto-updated in the left one. In another post of this thread I have updated my advances and questions. I do not understand. Is my example not answering your question? No, is not. Your example shows how to change the selection in the left panel from the right panel. I want to change the value of the left panel by writing to the right one. I don't know if this explains better. Cheers, Offray _________________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch <mailto:Moose-dev@iam.unibe.ch> https://www.iam.unibe.ch/__mailman/listinfo/moose-dev <https://www.iam.unibe.ch/mailman/listinfo/moose-dev>
-- www.tudorgirba.com http://www.tudorgirba.com
"Every thing has its own flow"
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Hi again,
On [1] I have my new experiment:
[1] http://ws.stfx.eu/FC5EQX66TWMA
This shows the current index and the changes on the text port in the Transcript, but when the uncomment the line
"data at: (data indexOf: value) put: textPresentation text asString"
I get a message "SubscriptOutOfBounds after typing the first change on the selected element. This is understandable because, as the error window shows, now I have and updated array, but the value that I'm looking for is not updated.
There is any way to update the value?
Thanks,
Offray
Ps: By the way, sharing code and questions on it using stfx.eu is really good for me. I know the code is published for future reference and uploadable with ZnWorkspace. Just some suggestions:
- To have numbered code lines, to refer and specific line of a published code. - Would be nice to open the code in a playground instead of a classic workspace. They're more interactive and newbie friendly. - Can the code be published optionally with the author? I imagine searching for the code I have posted on stfx for solving some future questions.
El 04/12/14 a las 18:20, Offray Vladimir Luna Cárdenas escribió:
Hi :),
Comments inlined below
El 04/12/14 a las 09:48, Tudor Girba escribió:
On Thu, Dec 4, 2014 at 3:35 PM, Nicolai Hess <nicolaihess@web.de mailto:nicolaihess@web.de> wrote:
[...]
The real problems might be, - how to access the list, that is used by the left presentation and
Why do you need that? You typically need something from that list and if you need that you pass it along in the transmission. Any transmission can have multiple from: clauses specified and in doing so you get the values of those ports in the block.
Well I need particular values on the list. So this part is almost solved.
- how to access the selected *index* of the list, so he can do a
at:put: on that data
That is not possible.
For the moment I'm thinking in 'indexOf: value' and then replacing the current selection with "at: put:" using that result. Once I have this two instructions I would like to update the selected value on the list with the current textPresentation value in a similar way to what is done with the Transcript. This is a workaround for the direct writing of values in list/trees inside GT Moose, but I think that this could work. I would make some test about this idea and keep you posted.
Cheers,
Offray
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev