I've got a project that has numerous subStacks, to which I often make
changes or enhancements. Numerous others use the same basic project,
and in order to simplify updating their projects, I have the user run
an "updater" stack, which among other things deletes the subStack
that has been changed in their project, and adds a "copy of" that
substack to their mainstack, and renames it back to its original name.
My problem comes when I then attempt to re-order the substacks in the
mainstack. The below script works fine in Revolution versions
previous to 3.0, but when run in 3.0 causes Revolution to shut down,
and results in the original stack being left with only one substack.
If you want to download a test stack with half a dozen substacks, and
the button installed in the mainstack, the URL is below.
http://ddm.geo.umass.edu/ddm-testReorderStacks-rev.zip
I caution you that you might want to make a copy of it, and run that
copy because of how Rev 3.0, along with shutting down, changes the
original multi-substack version to a single stack version before
quitting.
Appreciate any help with this - it does look bad to tell users you
have to use a previous version of Revolution to run this re-ordering
script.
Chris
button script:
--re-order substacks
on mouseUp
set the hilite of me to true
put mainstacks() into listOfMainStacks
put the num of lines in listOfMainStacks into numToDo
repeat with x = 1 to numToDo
if char 1 to 4 of line x of listOfMainStacks = "ddm-" then
put line x of listOfMainStacks into thismainStack
exit repeat
end if
end repeat
set the cursor to busy
lock Screen
orderSubs thismainStack
set the hilite of me to false
beep
answer "Done!"
set the cursor to arrow
set the hilite of me to false
end mouseUp
on orderSubs thismainStack
get the substacks of stack thismainStack
sort it
set the substacks of stack thismainStack to it
save stack thismainStack
end orderSubs
--
Dr. Christopher D. Condit, Associate Prof., Dept. of Geosciences
Univ. Massachusetts, 611 North Pleasant St., Amherst, MA, 01003-9297
[EMAIL PROTECTED] 413-545-0272
My Web Page: http://www.geo.umass.edu/faculty/condit.htm
Revolution Dynamic Digital Maps: http://ddm.geo.umass.edu
_______________________________________________
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution