How to find the name of the recent card?

David Bovill david at viral.academy
Sat Jul 2 10:20:34 EDT 2016


It is inconsistent.

If the recent card is updated after preOpenCard - then the current card
should behave the same. At the moment the recent cad and the current card
return the same result in a preOpenCard handler.

My use case is to create a quick handler which takes action depending on
where you have come from - so I need access to either the recent card, or
the current card in a perOpenCard handler. If I use and open card and let
there will be a small glitch / delay between displaying the card and
rendering the information the information.

Sure I can write ways around it that are complex - but I just want access
to the recent card or the current card :)

On Saturday, 2 July 2016, Mark Waddingham <mark at livecode.com> wrote:
>
>
> Is it an inconsistency? The 'recent' cards appear to be the list of cards
> that were visited before the current one - if openCard has not yet been
> reached then you could argue you haven't yet visited a new card. This
> appears to be by intent in the engine source after a quick look. (The
> recent card list is updated between preOpen and Open). The recent card list
> is also updated when window focus changes - so it can contain cards from
> any stack and will change as the user switches between windows.


> What is your use-case in this scenario?
>
> If you are wanting to know what card was 'come from' in a specific stack,
> then you could store that in a custom property of the stack at the end of
> OpenCard. Up until that point, the custom prop will have the previous card
> which is displayed.
>
> Warmest Regards,
>
> Mark.
>
> --
> Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
> LiveCode: Everyone can create apps
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list