View Single Post
11-03-05, 09:29 AM   #1
xmlover
A Fallenroot Satyr
Join Date: Oct 2005
Posts: 25
CheckButton & Initialize Function......

once i wrote the code based on a thought

when CheckButton got checked, its value is 1
when it's uncheck . its value is 0



but i was wrong....when it's uncheck....its value is NIL......

so my Initialize Function should sth like this

Code:
UserSet = {}
function MyUI_Initialize()

        if UserSet=nil then 
             ---- new user-----
        else
             ----- previous user -----
        end
end

and it's begin.......

when my default is set alll status ON

and user goes to Config Window and set all CheckButton Unchecked.....

next time when he is back.....

UserSet = nil...... ('cos all his Child is nil.....)

and he goes to Default Settings.........................

Hmmm,,,, how can I handle this.....



or....maybe I was totally wrong.....

maybe..the table is still there

with nothing but UserSet = {} .................



how i loved checked buttons.....
  Reply With Quote