RISCOS Ltd RISCOS Ltd -------------------------------------- TECHNICAL NOTE: USER INTERFACE TOOLBOX -------------------------------------- Document: Version: 0.00 (04 Apr 2000) DPT: Initial version. 0.01 (10 Apr 2000) DPT: Updated in response to comment from Tom Hughes: R0 flags documentation is also incorrect. Author(s): David Thomas 1) INCORRECT DOCUMENTATION OF SLIDER_SETBOUND AND SLIDER_GETBOUND Applicability: Anything that uses the slider gadget. Description: In the User Interface Toolbox manual the upper and lower bound flags and parameters of Slider_SetBound and Slider_GetBound are given the wrong way around - upper, lower. They are in fact used by the slider gadget in the opposite order. Corrections as follows: Page 398: Slider_SetBound On entry R0 = flags bit 0 set means set lower bound bit 1 set means set upper bound ... R4 = lower bound R5 = upper bound Page 399: Slider_GetBound On exit R0 = flags bit 0 set means return lower bound bit 1 set means return upper bound ... R0 = lower bound R1 = upper bound The C veneers given should also have their upper and lower bounds swapped. Note that the current StrongHelp documentation is incorrect on this matter. Recommendation: In toolboxlib, slider_set_bound and slider_get_bound veneers give their parameters in the incorrect order. If you are currently setting bits 0 and 1 of the flags word in order to set the lower and upper bounds then it is simply a case of passing your lower bound first and your upper bound second. Whatever library you have, this will work correctly. If, on the other hand, you are using the flags word to set the bounds separately, then then you must take care to ensure that bit 0 is set for lower bound and bit 1 is set for upper bound. -- Comment: Toolbox technote 0.01 Part: 20000410-001