I am reading a DB file to get the text to assign to a button. The problem is that when I attempt to apply the text I get a:
ERROR #Gadget object not initialized
Now in order for you to press this button and rename the text on all the other buttons the window that HAS the other buttons IS open... As far as I know they are initialized.
Code: Select all
Procedure Button_SEL0_Event(Window, Event, Gadget, Type)
b = 0
frag$ = GetGadgetText(#Button_SEL0) ; what table name (same as text of button)
Debug frag$
DatabaseQuery(#Database, "SELECT * FROM "+frag$+"';") ;
For b = 0 To 24
but$=GetDatabaseString(#Database, 1) ; FOOD COLUMN
Debug but$ ; **** This lists all names correctly!!!
SetGadgetText(#Button_IT0+b,but$ ) ; **** ERROR HERE
NextDatabaseRow(#Database)
Next
b=0
EndProcedure