ok, more glamour questions

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

ok, more glamour questions

EstebanLM
Hi,
I have a browser with this form:

buildBrowser
        | browser |
       
        browser := GLMTabulator new
                title: 'Game Viewer';
                row: #galaxy;
                row: #status size: 25;
                yourself.
               
        browser transmit
                to: #galaxy;
                andShow: [ :presenter |
                        presenter morph
                                title: [ :aGame | aGame name ];
                                display: [ :aGame | (HGUIGalaxyMorph on: aGame galaxy) ].
               
        browser transmit
                to: #status;
                from: #galaxy;
                andShow: [ :presenter |
                        presenter text
                                display: [ :aStar | aStar asString ] ].
                       
        ^browser

problem is that HGUIGalaxyMorph is a very complex morph (well... it will be ;) )... and it updates some status around the "stars"... and I need to transmit that information to other panes... and I don't know  how...
so... that's the question: how I trigger an event? is that possible? if not... how it is supposed to do something like that?

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

Re: ok, more glamour questions

Tudor Girba-2
Hi Esteban,

Preferably, a presentation communicates with the outside world by populating values in the ports of its pane. Afterwards, it is up to you to create the necessary transmissions between these ports.

In your case, either you pass the presentation to the morph so that you can have access to the pane, or you create a GalaxyPresentation that will be rendered with HGUIGalaxyMorph. The second one is probably the cleanest.

Cheers,
Doru


On 2 Oct 2011, at 01:23, Esteban Lorenzano wrote:

> Hi,
> I have a browser with this form:
>
> buildBrowser
> | browser |
>
> browser := GLMTabulator new
> title: 'Game Viewer';
> row: #galaxy;
> row: #status size: 25;
> yourself.
>
> browser transmit
> to: #galaxy;
> andShow: [ :presenter |
> presenter morph
> title: [ :aGame | aGame name ];
> display: [ :aGame | (HGUIGalaxyMorph on: aGame galaxy) ].
>
> browser transmit
> to: #status;
> from: #galaxy;
> andShow: [ :presenter |
> presenter text
> display: [ :aStar | aStar asString ] ].
>
> ^browser
>
> problem is that HGUIGalaxyMorph is a very complex morph (well... it will be ;) )... and it updates some status around the "stars"... and I need to transmit that information to other panes... and I don't know  how...
> so... that's the question: how I trigger an event? is that possible? if not... how it is supposed to do something like that?
>
> cheers,
> Esteban
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"There are no old things, there are only old ways of looking at them."




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