CheckValueRanges()?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/01/2005 at 21:27, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 8.012
Platform: Windows ;
Language(s) : C++ ;---------
Okay, strangeness.Here's my code, called from iPDialog::Command() :
// CMD: Set FPS void iPDialog::SetFPS(LONG value) { //if ((value < FPS_MIN) || (value > FPS_MAX)) if (CheckValueRanges()) SetLong(IP_SET_FPS, settings.GetFPS(), FPS_MIN, FPS_MAX, 1); else settings.SetFPS(value); }
1. Note that checking for the opposite return works (TRUE = bad value, FALSE = good value). This is not what the documentation says. Maybe I'm not implementing it correctly - how should I know since there are no examples or explanations.
2. When there is a bad value in this case, it doesn't set it to the previous value (settings.GetFPS()), it makes it a part of the value (501 > 50, 600 > 60, etc.).
I could use my own check (commented out), but can't get the gadget to update and cannot find a proper method/message to do this. Appreciate some explanations.
Thanks,
Robert -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/01/2005 at 00:41, xxxxxxxx wrote:
Figured it out:
settings.SetFPS(value); SetLong(IP_SET_FPS, settings.GetFPS(), FPS_MIN, FPS_MAX, 1);
The value is always within bounds, so I just need to grab it and then set the EditNumber gadget to show the bounded value instead of the typed-in one.
Robert