craigpmiller
11-26-2009, 12:06 AM
I was hoping to save my spinner settings by creating a rcmenu
rcmenu RC_Menu_Main
(
submenu "File"
(
menuitem File_Open "Open ..."
menuitem File_Save "Save ..."
separator sp1
menuitem File_Exit "Exit"
)
)
in combination with
fn saveSettings =
(
setINISetting INIFilename "Home" "W_C_D" (SPN_W_C_D.value as string)
setINISetting INIFilename "Home" "Advance" (SPN_Stride_Advance.value as string)
)
fn loadSettings =
(
try(SPN_W_C_D.value = (getINISetting INIFilename "Home" "W_C_D" ) as float)catch()
try(SPN_Stride_Advance.value = (getINISetting INIFilename "Home" "Advance") as float)catch()
)
BUT ... :cry:
the rcmenu is defined BEFORE the rollout and the values that need saving are IN the rollout so loadSettings() and saveSettings() don't eval properly, of course.
I could use a button generated in the rollout but that negates the point of using the rcmenu...
Any pointers?
rcmenu RC_Menu_Main
(
submenu "File"
(
menuitem File_Open "Open ..."
menuitem File_Save "Save ..."
separator sp1
menuitem File_Exit "Exit"
)
)
in combination with
fn saveSettings =
(
setINISetting INIFilename "Home" "W_C_D" (SPN_W_C_D.value as string)
setINISetting INIFilename "Home" "Advance" (SPN_Stride_Advance.value as string)
)
fn loadSettings =
(
try(SPN_W_C_D.value = (getINISetting INIFilename "Home" "W_C_D" ) as float)catch()
try(SPN_Stride_Advance.value = (getINISetting INIFilename "Home" "Advance") as float)catch()
)
BUT ... :cry:
the rcmenu is defined BEFORE the rollout and the values that need saving are IN the rollout so loadSettings() and saveSettings() don't eval properly, of course.
I could use a button generated in the rollout but that negates the point of using the rcmenu...
Any pointers?
