little addition to Glamour: onChangeOfPort:act:

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

little addition to Glamour: onChangeOfPort:act:

Tudor Girba-2
Hi,

Glamour now supports the triggering of actions when a port changes value. Until now, this was possible only through a hackish transmission, but now you can say more succinctly:

GLMCompositePresentation new 
with: [ :composite |
composite text 
onChangeOfPort: #text act: [ :textPresentation | 
Transcript cr; cr; show: textPresentation text ] ];
openOn: ''

As a first application, the GTPlayground now saves the content when you type it and not when you "Go" it as it was until now.

@Offray: I implemented this feature because of your request from a while ago. That "non-expert" question was an important trigger. You see, everyone can have a significant contribution regardless of the "expert" status. Thanks  :)

Cheers,
Doru



--

"Every thing has its own flow"

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: little addition to Glamour: onChangeOfPort:act:

Offray
Hi Doru,

Thanks for your kind words. It has been an awesome learning experience
to work with Pharo/Moose/Roassal and the communities around them which
have such supportive people like you. I tried to test your code, and I
supposed that I needed to update Moose first, but when I tried to run
the code on[1] I got a lot of warnings and finally I cancel the process
but after that I get warning almost any time that I did something on a
playground. May be it was because I cancelled and on-going installation
without finish it. I'm have downloaded a fresh beta image, and the code
run just fine but I wondering:

a. if there is any smoother way to update an image to moose to its
latest version.
b. Do you remember my minimal examples of an update using transmitions
to #nowhere ? (I have published it at [2]). I imagine that now we can
have something like a live update of columns at the left editing the
column at the right. I will be making some experiments as soon as I have
support for BibTeX on my Moose powered notebook.

I'll keep you posted.

[1] http://www.moosetechnology.org/#install
[2] http://pastebin.com/BueRjwbB

Cheers,

Offray


On 10/19/2014 02:27 AM, Tudor Girba wrote:

> Hi,
>
> Glamour now supports the triggering of actions when a port changes value. Until
> now, this was possible only through a hackish transmission, but now you can say
> more succinctly:
>
> GLMCompositePresentation new
> with: [ :composite |
> composite text
> onChangeOfPort: #text act: [ :textPresentation |
> Transcript cr; cr; show: textPresentation text ] ];
> openOn: ''
>
> As a first application, the GTPlayground now saves the content when you type it
> and not when you "Go" it as it was until now.
>
> @Offray: I implemented this feature because of your request from a while ago.
> That "non-expert" question was an important trigger. You see, everyone can have
> a significant contribution regardless of the "expert" status. Thanks  :)
>
> Cheers,
> Doru
>
>
>
> --
> www.tudorgirba.com <http://www.tudorgirba.com>
>
> "Every thing has its own flow"
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev