Oops, managed my own fudge for this:
TUPLE: uiInt intModel strModel ;
M: uiInt model-changed strModel>> swap value>> number>string swap set-model
;
: <uiInt> ( int -- uiInt ) uiInt new
over <model> 2dup add-connection >>intModel
over number>string <model> >>strModel nip ;
: uiInt>> ( uiInt -- int ) intModel>> value>> ;
: >>uiInt ( int uiInt -- ) intModel>> set-model ;
: change-uiInt ( uiInt quot: ( int -- int ) -- ) swap intModel>> swap
change-model ; inline
Mark
On Mon, Jul 15, 2013 at 11:58 PM, Mark Green <m...@antelope.nildram.co.uk>wrote:
> Hi,
>
> Sorry - one other question:
>
> If I have a numeric value that I want to put onto a UI, am I forced to
> store it in a model as a string? Or to have two models, one for the number
> and one for the string?
>
> Mark
>
>
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk