[Glamour] default selection in ListPresentation

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

[Glamour] default selection in ListPresentation

cdelaunay
Hello,

Is there a way to set a default selection to a list presentation? so that when I open the browser, the morphic list has already a value selected.
I tried that:

  |tmpBrowser|
  tmpBrowser := GLMTabulator new.
  tmpBrowser row: #list.
  tmpBrowser transmit to: #list; andShow: [:a |
a list
display: [:input | input];
selection: #a;
yourself
].
tmpBrowser openOn: #( b c d v a d f r).


but the list still open with nothing selected

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

Re: [Glamour] default selection in ListPresentation

cdelaunay
Ok, I looked to the customizable system complexity and I will try the way it is done there

2011/6/15 Cyrille Delaunay <[hidden email]>
Hello,

Is there a way to set a default selection to a list presentation? so that when I open the browser, the morphic list has already a value selected.
I tried that:

  |tmpBrowser|
  tmpBrowser := GLMTabulator new.
  tmpBrowser row: #list.
  tmpBrowser transmit to: #list; andShow: [:a |
a list
display: [:input | input];
selection: #a;
yourself
].
tmpBrowser openOn: #( b c d v a d f r).


but the list still open with nothing selected


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

Re: [Glamour] default selection in ListPresentation

Andre Hora
In reply to this post by cdelaunay
Hello Cyrille,

| tmpBrowser model |

model := #( b c d v a d f r ).

tmpBrowser := GLMTabulator new.
tmpBrowser row: #list.

tmpBrowser transmit to: #list; andShow: [:a |
    a list
    display: [:input | input];
    yourself ].

tmpBrowser transmit to: #list->#selection; fromOutside: #listToSelect.   
tmpBrowser openOn: model.

(tmpBrowser pane port: #listToSelect) value: model second. "set here the one to be selected"

regards,

On Wed, Jun 15, 2011 at 11:52 AM, Cyrille Delaunay <[hidden email]> wrote:
Hello,

Is there a way to set a default selection to a list presentation? so that when I open the browser, the morphic list has already a value selected.
I tried that:

  |tmpBrowser|
  tmpBrowser := GLMTabulator new.
  tmpBrowser row: #list.
  tmpBrowser transmit to: #list; andShow: [:a |
a list
display: [:input | input];
selection: #a;
yourself
].
tmpBrowser openOn: #( b c d v a d f r).


but the list still open with nothing selected

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




--
Andre Hora


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

Re: [Glamour] default selection in ListPresentation

cdelaunay
It works, thank you ;)

2011/6/15 Andre Hora <[hidden email]>
Hello Cyrille,

| tmpBrowser model |

model := #( b c d v a d f r ).


tmpBrowser := GLMTabulator new.
tmpBrowser row: #list.

tmpBrowser transmit to: #list; andShow: [:a |
    a list
    display: [:input | input];
    yourself ].

tmpBrowser transmit to: #list->#selection; fromOutside: #listToSelect.   
tmpBrowser openOn: model.

(tmpBrowser pane port: #listToSelect) value: model second. "set here the one to be selected"

regards,

On Wed, Jun 15, 2011 at 11:52 AM, Cyrille Delaunay <[hidden email]> wrote:
Hello,

Is there a way to set a default selection to a list presentation? so that when I open the browser, the morphic list has already a value selected.
I tried that:

  |tmpBrowser|
  tmpBrowser := GLMTabulator new.
  tmpBrowser row: #list.
  tmpBrowser transmit to: #list; andShow: [:a |
a list
display: [:input | input];
selection: #a;
yourself
].
tmpBrowser openOn: #( b c d v a d f r).


but the list still open with nothing selected

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




--
Andre Hora


_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: [Glamour] default selection in ListPresentation

Sean P. DeNigris
Administrator
In reply to this post by cdelaunay
cdelaunay wrote
> Is there a way to set a default selection to a list presentation?

RTF, here's IMHO a simpler way via Peter Uhnak:

    a list
        onChangeOfPort: #entity act: [ :pres :items |
        items ifNotEmpty: [ (pres pane port: #selection) value: items first ] ]



-----
Cheers,
Sean
--
Sent from: http://forum.world.st/Moose-f1310756.html
_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.list.inf.unibe.ch/listinfo/moose-dev
Cheers,
Sean