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
Ok, I looked to the customizable system complexity and I will try the way it is done there
2011/6/15 Cyrille Delaunay cy.delaunay@gmail.com
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
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 cy.delaunay@gmail.comwrote:
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 Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
It works, thank you ;)
2011/6/15 Andre Hora andrehoraa@gmail.com
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 cy.delaunay@gmail.comwrote:
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 Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- Andre Hora
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
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