Holá everybody,
Is there anybody, who knows, how to exclude (not put in) an opened stack/Card from recentcards?
I don't understandf (as usual) the docs
best regards and thank you
Horst
how to exclude cards/stacks from recentcards?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Location: Aalst, Belgium
- Contact:
Hi Horst,
The only way to excluse cards from being added, is explicitly setting the global lockRecent property to true before going to the card. By default, this property is set to false, and it will automatically be reset to false when all running handlers are finished - so you can't set it once and forget about it.
There are two ways of doing this - both versions do the same thing, but it just goes to show how syntactically rich Revolution is and how it fits your programming style.
Hope this helped,
Jan Schenkel.
The only way to excluse cards from being added, is explicitly setting the global lockRecent property to true before going to the card. By default, this property is set to false, and it will automatically be reset to false when all running handlers are finished - so you can't set it once and forget about it.
There are two ways of doing this - both versions do the same thing, but it just goes to show how syntactically rich Revolution is and how it fits your programming style.
Code: Select all
lock recent
-- now go to the card
unlock recent
Code: Select all
set the lockRecent to true
-- now go to the card
set the lockRecent to false
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
-
- VIP Livecode Opensource Backer
- Posts: 977
- Joined: Sat Apr 08, 2006 7:47 am
- Location: Aalst, Belgium
- Contact:
Hi Horst,
Upon revisiting this problem, things do seem to act strange:
- I created a new mainstack "mainie"
- I added two substacks "subbie1" and "subbie2"
- I went back to the mainstack and added a button
When I clicked the button, everything ran as I had expected.
However, when I added a button to subbie2 to display the recentCards again, it did show a reference to card 1 of subbie2.
So I went back to the mainstack, dropped in a field, and chanegd the button script to
In that scenario, there was no reference to subbie2 after I had returned to the mainstack. This would suggest that:
- as long as your handler is running, the lockRecent is respected
- if you end on a card that can be added to the recentCards, there's no problem
- if you end on a card that you don't want added to the recentCards, it will be added as soon as you leave this card (e.g. by using an 'answer' dialog or by clicking in another window)
In conclusion, if you don't want a certain card to be added to the recentCards, lock recent before you go there, and don't end your navigation on that card.
Hope this clariefied things a bit,
Jan Schenkel.
Upon revisiting this problem, things do seem to act strange:
- I created a new mainstack "mainie"
- I added two substacks "subbie1" and "subbie2"
- I went back to the mainstack and added a button
Code: Select all
on mouseUp
-- first display the current situation for later reference
answer the recentCards
-- next go to the first substack without locking recent
open stack "subbie1"
-- now the first line of the recentCards should point to card 1 of subbie1
answer the recentCards
-- next go to the second substack while locking recent
lock recent
open stack "subbie2"
unlock recent
-- the first line of the recentCards should still point to card 1 of subbie1
answer the recentCards
end mouseUp
However, when I added a button to subbie2 to display the recentCards again, it did show a reference to card 1 of subbie2.
So I went back to the mainstack, dropped in a field, and chanegd the button script to
Code: Select all
on mouseUp
put the long ID of field 1 of the owner of me into tFieldRef
do "put empty into" && tFieldRef
do "put the recentCards & return & " & quote & "--" & quote & " & return before " & tFieldRef
open stack "subbie1"
do "put the recentCards & return & " & quote & "--" & quote & " & return before " & tFieldRef
lock recent
open stack "subbie2"
unlock recent
do "put the recentCards & return & " & quote & "--" & quote & " & return before " & tFieldRef
open stack "mainie"
do "put the recentCards & return & " & quote & "--" & quote & " & return before " & tFieldRef
end mouseUp
- as long as your handler is running, the lockRecent is respected
- if you end on a card that can be added to the recentCards, there's no problem
- if you end on a card that you don't want added to the recentCards, it will be added as soon as you leave this card (e.g. by using an 'answer' dialog or by clicking in another window)
In conclusion, if you don't want a certain card to be added to the recentCards, lock recent before you go there, and don't end your navigation on that card.
Hope this clariefied things a bit,
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com
www.quartam.com
Hi Jan,
Thanks for replying and your try to find a solution. But, I'm sorry the Result is the same than before
But I think I found the reason.
Inside the button which calls another stack I use (have to) the
"open process" to call an external Program
If I disable this line, everything works fine.
The problem is now, that I have to open this programm which dials a given phone number. Any idea what to do?
best regards
Horst
Thanks for replying and your try to find a solution. But, I'm sorry the Result is the same than before
But I think I found the reason.
Inside the button which calls another stack I use (have to) the
"open process" to call an external Program
If I disable this line, everything works fine.
The problem is now, that I have to open this programm which dials a given phone number. Any idea what to do?
best regards
Horst