Page 1 of 1

Transfer Hilite Button Value From Stack To Stack

Posted: Wed Oct 22, 2008 3:04 pm
by warrenk
I have two stacks. The main stack (stack1) is my application. The substack (stack2) is a setting stack where I can change default values on my main stack. These values are stored in a file.

When I open my main stack, I read my settings file to retrieve the default values. This is working great.

My problem occurs when I change the values in the setting file (stack2)and try to update the values in the main stack (stack1). Changing fields works as I use the put command and specify the stack

put tFiles into field "Files" of stack "stack1"

Is there anyway to use the same logic with the hilite command?

ie. hilite button option1 of stack "stack1"

If the above isn't possible, what is the best way to "refresh" my main stack to pull in the most current values? Should I close/open the stack or card again?

Posted: Wed Oct 22, 2008 5:52 pm
by gyroscope
Hi warrenk
Is there anyway to use the same logic with the hilite command?
ie. hilite button option1 of stack "stack1"
No probs there:

Code: Select all

    hilite button "option1" on card 1 of stack "Untitled 1"
The only thing here is hilite, or any other parameters changed, won't be saved when (if) you make your stack into an application.

The solution there is to make your mainstack an About box, or even a Hello screen (or blank!) then your main app stack becomes a substack, and your setting file becomes the second substack. That way, when you save it as an application, you can specify that only the first mainstack is the application and all other stacks (substacks) are to remain as stacks, so that your main (sub)stack will "remember" any changes.

Hope that's sorted it for you.

:)

Posted: Thu Oct 23, 2008 1:33 pm
by warrenk
gyroscope,

Thanks for the detailed explanation. This is very informative. you solved my problem! :lol:

Warren