Re: Counters

Manolo Gouy (mgouy@biomserv.univ-lyon1.fr)
Thu, 20 Mar 1997 10:21:19 +0100

To subscribers of the xforms list from mgouy@biomserv.univ-lyon1.fr (Manolo Gouy) :

> >I just realized that I can set a counter to a value outside its
> >valid range. For example,
> > fl_set_counter_bounds (mycounter, 0.0, 10.0);
> > fl_set_counter_value (mycounter, -1.0);
>
> > double newval = fl_get_counter_value (mycounter);
> >then newval will be set to -1 too.
>
> >Is this behavior desirable for some reason?
>
> No, not really. Unless someone violently objects
> (and convinces me it's a bad idea), I will change set_counter_value
> so value will be clamped to the bounds.
>

T.C.: I'd like to warn about a potential problem:
Having decided to control that value is coherent with bounds, one may think that
also bounds should be compatible with current value. If this is so, it may
become difficult to change bounds and value at run-time. So, please,
avoid that problem.
__________________________________________________________________________
| Manolo Gouy |
| Laboratoire de biometrie, genetique et biologie des populations |
| UMR CNRS 5558 | E-MAIL : mgouy@biomserv.univ-lyon1.fr |
| Universite C. Bernard - Lyon 1 | Tel : +33 4-72-43-12-87 |
| 69622 Villeurbanne, France | Fax : +33 4-78-89-27-19 |
|_________________________________|________________________________________|
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html
Xforms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/xforms-archive/