Set the icon to (icon of another stack)--YES!
Rob Cozens
rcozens at pon.net
Thu Jan 5 12:20:27 EST 2006
Paul,
>Can your design allow you to separate the images in "X2" from the
>resources that must be opened?
A simpler solution?:
on switchLibraries
stop using stack currentLibrary -- may need to be tweaked?
close stack currentLibrary
set the itemDelimiter to "/"
get item -1 of currentLibrary
if it is "x3.rev" then
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
if currentLibrary is imagePath2 then
stop using stack imagePath2
close stack imagePath2
lock messages -- [?]
open stack imagePath1 -- &/or start using ?
unlock messages
-- don't change currentLibrary, so the next call will toggle
[may cause problems in line 1 & 2 above]
end if
end switchLibraries
Experience shows us the icons won't change if refreshButtons is not
sent to the stack.
Rob Cozens, CCW
Serendipity Software Company
Vive R Revolution!
More information about the use-livecode
mailing list