Re: [Factor-talk] Models for UI

2013-07-15 Thread John Benediktsson
One thing you could do is use an arrow to make it presentable:

12.5 model [ present ] arrow label-control dup gadget.


On Mon, Jul 15, 2013 at 3:58 PM, Mark Green m...@antelope.nildram.co.ukwrote:

 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=48808831iu=/4140/ostg.clktrk
 ___
 Factor-talk mailing list
 Factor-talk@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/factor-talk


--
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=48808831iu=/4140/ostg.clktrk___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk


Re: [Factor-talk] Models for UI

2013-07-15 Thread Mark Green
Oops, managed my own fudge for this:

TUPLE: uiInt intModel strModel ;

M: uiInt model-changed strModel swap value numberstring swap set-model
;

: uiInt ( int -- uiInt ) uiInt new
  over model 2dup add-connection intModel
  over numberstring 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.ukwrote:

 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=48808831iu=/4140/ostg.clktrk___
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk