Page 1 of 1

ReAction IntegerObject

Posted: Wed Aug 12, 2015 10:21 pm
by duga
Code:
LAYOUT_AddChild, OBJ(OBJ_NUMBER) = IntegerObject,
GA_Text, "Size",
GA_ID, OBJ_NUMBER,
INTEGER_Arrows, TRUE,
INTEGER_Number, 500,
INTEGER_Minimum, 1,
INTEGER_Maximum, 1000,
GA_Disabled, TRUE,
End, /* Integer */

Question:
Is it possible to adjust the "INTEGER_Number", in this case 500, to something else while running the program, or is it "fixed as a starting value"? Yes, the user can of course change it to something between, in this example, 1 and 1000. But I want to read a value from a file that replaces 500 at program start. 500 should only be a "fallback" in case for example the file doesn't exist.

Re: ReAction IntegerObject

Posted: Wed Aug 12, 2015 10:27 pm
by broadblues
SetGadgetAttrs(integergadget, windowptr, requesterptr (often NULL), INTEGER_Number,newvalue,TAG_DONE);


windowptr is the pointer to the intuition window *not* the window object.

read the auto docs! and study the wiki bits on BOOPSI http://wiki.amigaos.net/wiki/BOOPSI_Class_Reference

http://wiki.amigaos.net/wiki/BOOPSI_-_O ... _Intuition

Re: ReAction IntegerObject

Posted: Wed Aug 12, 2015 11:17 pm
by duga
Solved it, thanks!