PDA

View Full Version : Setting ini file states help


lucpet
07-03-2011, 03:33 AM
:blush: I feel stupid as I cant get my brain around setting the checkbox's state
I have got it to work in the ini file, my problem is getting the checkbox on
the ui to reflect the state of the the saved ini file

on openMS open do -- Gets the path to the render ouput from the ini file
(
chkrSv = execute (getINISetting theINI "chk_box" "s_out")
if (chkrSv != OK and classof chkrSv == string) then chkrS.state = chkrSv
)

on openMS close do -- Saves the path to the render ouput to the ini file
(
setIniSetting theINI "chk_box" "s_out" (chkrS.state as string)
)

This is the part I'm having trouble with and I'm sure I've done something like this before
What you see below is but one of a dozen attempts to set the checkboxes
state to be set via the saved ini file and now my brain is so strained I appeal
to you for some help as I no longer have a clear mind on the problem :banghead:

on chkrS changed state do
(
rendSaveFile = chkrS.state
if state == on then
chkrS.state = true
else
chkrS.state = false
)

lo
07-03-2011, 09:08 AM
on openMS open do -- Gets the path to the render ouput from the ini file
(
chkrS.state = try((getINISetting theINI "chk_box" "s_out") as booleanClass)catch(false)
)

lucpet
07-03-2011, 11:02 AM
Thanks lo
Over thinking it again, if such a thing is possible with me lol

Huge sigh of relief :bounce:

CGTalk Moderation
07-03-2011, 11:02 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.