Hi Manuel,
add-connection is used to implement new controls. If you wanted to display
the current selection in another window, then just creating a label-control
from the selection model would be enough: the label-control gadget calls
add-connection and activate-model on its own.
Also, models and control are most useful when you want a computation (for
example UI update) done every time the data changes (through
add-connection). Also they implement some kind of laziness because some
computations are only done if an observer has activated the model (for
control gadget, this is done when they are visible on screen, through
activate-model).
For just copying the data when the user presses the select button you don't
need the features of models. You can just grab the value>> of the selection
model at the time the user clicks the button.
How about having the same behavior when the "select" button is clicked as
when enter is pressed or when double clicking a row ? The following diff
passes a reference of the table to the quotation called by the button and
executes row-action on it:
http://paste.factorcode.org/paste?id=3120#1420
Cheers,
Jon
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk