Hi!
There is an example GLMBasicExamples>>dropDownList where a user can select a value from drop down list. If I change some lines like this:
-=-=- browser := GLMTabulator new. browser row: #one size: 30; row: #two. browser transmit to: #one; andShow: [:a | a dropDownList display: [ :myModelObject | myModelObject valuesForDropDownList ] ]. -=-=-
How can I update selected value in myModelObject when a user select something? Thanks! Juraj
Hi,
It's Glamour, not Glamorous. And the development tools form the Glamorous Toolkit :)
The Glamour widgets do not propagate changes to the model by default. But, you can get notified when something changes in a port. See below an example:
browser := GLMTabulator new. browser row: #one. browser transmit to: #one; andShow: [:a | a dropDownList display: [ :x | x ]; *onChangeOfPort: #selection * * act: [ :dropDownListPresentation | dropDownListPresentation selection inspect ] ]*. browser openOn: (1 to: 42)
Cheers, Doru
On Tue, Dec 30, 2014 at 11:39 PM, Juraj Kubelka juraj.kubelka@gmail.com wrote:
Hi!
There is an example GLMBasicExamples>>dropDownList where a user can select a value from drop down list. If I change some lines like this:
-=-=- browser := GLMTabulator new. browser row: #one size: 30; row: #two. browser transmit to: #one; andShow: [:a | a dropDownList display: [ *:myModelObject* | *myModelObject valuesForDropDownList* ] ]. -=-=-
How can I update selected value in myModelObject when a user select something? Thanks! Juraj
Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Hi,
On Dec 31, 2014, at 14:22, Tudor Girba tudor@tudorgirba.com wrote:
Hi,
It's Glamour, not Glamorous. And the development tools form the Glamorous Toolkit :)
Thanks for the explanation :-) I was a bit confused about it.
The Glamour widgets do not propagate changes to the model by default. But, you can get notified when something changes in a port. See below an example:
browser := GLMTabulator new. browser row: #one. browser transmit to: #one; andShow: [:a | a dropDownList display: [ :x | x ]; onChangeOfPort: #selection act: [ :dropDownListPresentation | dropDownListPresentation selection inspect ] ]. browser openOn: (1 to: 42)
Cool! And with two-arguments-block, I can write: act: [ :dropDownListPresentation :myModelObject | myModelObject selection: dropDownListPresentation selection ]
Thanks a lot :-) Juraj
Cheers, Doru
On Tue, Dec 30, 2014 at 11:39 PM, Juraj Kubelka <juraj.kubelka@gmail.com mailto:juraj.kubelka@gmail.com> wrote: Hi!
There is an example GLMBasicExamples>>dropDownList where a user can select a value from drop down list. If I change some lines like this:
-=-=- browser := GLMTabulator new. browser row: #one size: 30; row: #two. browser transmit to: #one; andShow: [:a | a dropDownList display: [ :myModelObject | myModelObject valuesForDropDownList ] ]. -=-=-
How can I update selected value in myModelObject when a user select something? Thanks! Juraj
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