Set the icon to (icon of another stack)--YES!
Paul Claude
paulclaude at postino.it
Thu Jan 5 04:56:40 EST 2006
Hi Rob,
Very good work. It actually may help people who must switch themes of a
stack.
For my needs, I cannot close the stack "X2", therefore your solution it's
not applicable.
Thanks however.
Paul Claude
on 5-01-2006 6:40, Rob Cozens at rcozens at pon.net wrote:
> All,
>
>> Chameleon stack script:
>
> On the vain presumption this might actually be of use to some people,
> here's an improved version. Initialization is moved from openStack
> to preOpenStack and the handlers otherwise tweaked.
>
> local imagePath1,imagePath2,currentLibrary
>
> on preOpenStack
> get the effective fileName of this stack
> set the itemDelimiter to "/"
> put "X2.rev" into item -1 of it
> put it into imagePath1
> put "X3.rev" into item -1 of it
> put it into imagePath2
> start using stack imagePath1
> put imagePath1 into currentLibrary
> refreshButtons
> end preOpenStack
>
> on switchLibraries
> set the itemDelimiter to "/"
> stop using stack currentLibrary
> close stack currentLibrary
> get item -1 of currentLibrary
> if it is "x3.rev" then -- use switch logic if toggling between
> three or more icon libraries
> start using stack imagePath1
> put imagePath1 into currentLibrary
> else
> start using stack imagePath2
> put imagePath2 into currentLibrary
> end if
> send "refreshButtons" to this stack in 1 tick
> end switchLibraries
>
> on refreshButtons
> lock screen
> repeat with x = 1 to the number of buttons
> set the icon of button x to (the icon of button x)
> end repeat
> unlock screen
> end refreshButtons
>
> Rob Cozens, CCW
> Serendipity Software Company
>
> Vive R Revolution!
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list