ReAction IntegerObject

This forum is for general developer support questions.
Post Reply
duga
Posts: 56
Joined: Wed May 27, 2015 7:11 am

ReAction IntegerObject

Post 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.
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 600
Joined: Sat Jun 18, 2011 2:40 am
Location: Portsmouth, UK
Contact:

Re: ReAction IntegerObject

Post 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
duga
Posts: 56
Joined: Wed May 27, 2015 7:11 am

Re: ReAction IntegerObject

Post by duga »

Solved it, thanks!
Post Reply