On 7/2/2016 11:09 AM, Mark Wieder wrote: > On 07/02/2016 07:20 AM, David Bovill wrote: >> It is inconsistent. > > Unsurprisingly, I find myself agreeing with Mark Waddingham here (we > Mark Ws have to stick together). In preOpenCard you're still in > transit, so you haven't yet arrived at the destination card. In that > case the card you came from is still the current card. After the > preOpenCard handler has finished, the card you came from is added to > the recent cards list and the destination card becomes current. > > Does querying "the target" in the preOpenCard handler give you what > you want in addition to "the current card"? >
Am I missing something. In a preOpenCard handler, "this card" should give you the card being opened. "recent card" gives you where you came from. A quick test in LC8 shows this works reliably. Put the following script in the stack script of a stack with a bunch of cards and navigate between the cards: on preOpenCard put "Recent:"&& the short name of recent card & cr into msg put "This:"&& the short name of this card & cr after msg end preOpenCard _______________________________________________ use-livecode mailing list [email protected] Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
