Charles Hartman wrote:
Thanks (as always!). But I put those four handlers in my substack's stack script (and saved and closed the whole thing and removed it from memory, then reopened it and navigated in the main stack and opened the substack and navigated within it), and both the "go back" and "go forth" buttons can still jump out of the substack.

I used the message box to check the lockRecent; it keeps coming up false, whether the substack is suspended or not. I found this in the docs:

By default, the lockRecent property is set to false. It is reset to false when no handlers are executing.

That looks like it might be the problem . . .

Aargh. Indeed. My apologies for running you around the block for nothing. I should have double-checked that before I replied.

So, your original script will work okay if I remember right. Or you could do something like this:

on opencard
  global gCdList
  if the short name of this stack is "theRightSubstack"
  then put the ID of this card & cr after gCdList
end opencard

Then your forward and back buttons could check gCdList, get a lineoffset to find the current card in the list, and use the next or previous line in gCdList as the destination for the "go". If there isn't a previous or next line in the list, then just go to the next or previous card in the stack normally.

Another thought was to use the built-in "push" and "pop" commands to build a list, but that may be more work than you want to do. You can check the validity of a card to see if it meets your criteria and if so, "push this card". That puts it at the top of an internal list that Rev keeps. "Pop card" returns you to the previous pushed card in the list and removes the entry from the list. Every subsequent "pop" moves you backward through your visited cards. This would let you go backward easily but not forward again, because popped entries are removed. However, you can "pop card before gCdList" which would move the entry from Rev's internal list and into your own global list. In that case, gCdList would be storing the "forward" list and Rev would be storing the "backward" list. It would probably work but you'd have two lists to keep track of.

But be cautious about listening to me, obviously I am fuzzy today. ;)

--
Jacqueline Landman Gay         |     [EMAIL PROTECTED]
HyperActive Software           |     http://www.hyperactivesw.com
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to