http://rpg.hamsterrepublic.com/bugzilla/show_bug.cgi?id=882

Ralph Versteegen <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #1 from Ralph Versteegen <[email protected]> 2011-02-21 19:39:18 
PST ---
Yes, this annoys me a lot too.

Unfortunately, this requires making intgrabber fields hold state beyond the
current value, as I've been forced to do recently with eg. the repr string
argument to percentgrabber. Updating all the zillion uses of intgrabber would
be nasty (you also have to be careful to correctly reset the state when
changing record).

One dirty hack I thought up and nearly used for some *grabbers I recently wrote
is:

DIM SHARED percent_curptr as double ptr
DIM SHARED percent_curstate as whatever

FUNCTION percentgrabber (BYREF n as double, ....
 IF percent_curptr <> @n THEN
  percent_curptr = @n
  percent_curstate = some default
 END IF
 ...

FUNCTION formatpercent (BYREF n as double, ...
 IF @n = percent_curptr THEN
  ...special path

This wouldn't actually have worked for those *grabbers, though, for reasons
involving properly resetting the state which I don't exactly remember. It might
work for intgrabber (probably without the format* function). When you are
editing an integer with value 0 and you press the minus key, do you expect to
see 0, -0, or -? The later two are of course harder.

-- 
Configure bugmail: 
http://rpg.hamsterrepublic.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Ohrrpgce mailing list
[email protected]
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org

Reply via email to