Lock Screen fails in going between substacks?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Lock Screen fails in going between substacks?
In OS X, my handler in one substack (in the forground on my screen) goes to another substack to do a quick text find, then returns to the original substack.
In spite of LOCK SCREEN, the second substack, which is open "behind" the original, invariably flashes into the foreground momentarily - is this right?
I've tried multiple LOCK SCREEN's and I've tried the simplest code of PUSH CARD, GO TO STACK, and POP CARD but I cannot get the screen to lock.
The second substack needs to remain visble in my application i.e., I cannot set it invisible.
Thanks for any help with this.
Doug
In spite of LOCK SCREEN, the second substack, which is open "behind" the original, invariably flashes into the foreground momentarily - is this right?
I've tried multiple LOCK SCREEN's and I've tried the simplest code of PUSH CARD, GO TO STACK, and POP CARD but I cannot get the screen to lock.
The second substack needs to remain visble in my application i.e., I cannot set it invisible.
Thanks for any help with this.
Doug
Hi doug,
I'm afraid this is expected behaviour. Lock Screen is relative to the stack window. If the topStack changes by going to another stack, that window will come to front. Maybe you could redesign the way you search the text in the the other stack. If you could paste a code snippet it would be helpful.
All the best,
Malte
I'm afraid this is expected behaviour. Lock Screen is relative to the stack window. If the topStack changes by going to another stack, that window will come to front. Maybe you could redesign the way you search the text in the the other stack. If you could paste a code snippet it would be helpful.
All the best,
Malte
Hi Doug,
Malte is right, the lock screen command doesn't prevent windows from appearing. They just don't redraw.
To keep a window invisible, use the go command:
However, it is not a good idea to keep data in fields on cards. It would be much better to keep your data in a file or disk or even in a custom property and use your stack only to display the data temporarily. Eventually, this works much faster.
Best,
Mark
Malte is right, the lock screen command doesn't prevent windows from appearing. They just don't redraw.
To keep a window invisible, use the go command:
Code: Select all
push cd
lock messages
go invisible stack "Stack to Search"
find "string"
put the foundChunk into myChunk
unlock messages
pop cd
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- Livecode Opensource Backer
Re: Lock Screen fails in going between substacks?
The question then is whether you need to physically go to that other stack. You could simply grab the text on another stack by referencing to that control.dbowling wrote:In OS X, my handler in one substack (in the forground on my screen) goes to another substack to do a quick text find, then returns to the original substack.
Code: Select all
put the long id of card "thisOtherCard" of stack "thisOtherStack" into tCardRef
put the text of field "myCaptivatingStopry" of tCardRef into tText
Last edited by marielle on Tue Apr 17, 2007 4:19 pm, edited 1 time in total.
-
- VIP Livecode Opensource Backer
- Posts: 9823
- Joined: Sat Apr 08, 2006 7:05 am
- Location: Los Angeles
- Contact:
Transition effects operate within a given window.
In Revolution stacks are contained within windows, and the windows are considered a separate entity. This allows you to "go" from one stack to another within the same window.
So to go from one stack to another in the same window you could use:
visual dissolve
go stack "b" in window of stack "a"
In Revolution stacks are contained within windows, and the windows are considered a separate entity. This allows you to "go" from one stack to another within the same window.
So to go from one stack to another in the same window you could use:
visual dissolve
go stack "b" in window of stack "a"
Thanks for everyone's responses - I see what I will need to do if I want to avoid the screen changes.
But I wonder if a "between-windows" Lock Screen might ever be added to Rev?
One of the really nice features of Revolution over HC, I thought, is the option of having multiple, simultaneously open windows. But if you want the windows and their contents to relate to one another dynamically, rather than in some pre-scripted way, then it would be much nicer if you could query the contents of a substack/window in the background, i.e., without bringing it forward (say, to decide whether you actually do want to bring it forward). I just think there are a lot of times when you would want to do that.
I know I can work around it but I'll have to keep track of a whole lot more stuff than I would if I could just look into the other window and see what's there.
Thanks again
Doug
But I wonder if a "between-windows" Lock Screen might ever be added to Rev?
One of the really nice features of Revolution over HC, I thought, is the option of having multiple, simultaneously open windows. But if you want the windows and their contents to relate to one another dynamically, rather than in some pre-scripted way, then it would be much nicer if you could query the contents of a substack/window in the background, i.e., without bringing it forward (say, to decide whether you actually do want to bring it forward). I just think there are a lot of times when you would want to do that.
I know I can work around it but I'll have to keep track of a whole lot more stuff than I would if I could just look into the other window and see what's there.
Thanks again
Doug
-
- Livecode Opensource Backer
Give a try to the long id stuff and you may discover this isn't as bad as you may think.dbowling wrote:I know I can work around it but I'll have to keep track of a whole lot more stuff than I would if I could just look into the other window and see what's there.
Compare
Code: Select all
go card "mycard" of stack "mystack"
put the text of field "myfield" into tText
Code: Select all
put the long id of card "mycard" of stack "mystack" into tCardRef
put the text of field "myfield" of tCardRef into tText
Marielle, Mark
Thanks for your further comments.
The problem is I want the other windows to always be visible so the user can see them and can click on any chosen one to bring it forward. Thus, "go invisible stack..." won't do as it makes the stack dissappear (or flash momentarily if I immediately set it visible again).
Also, I need to do a "Find", i.e., I don't know in advance which field on which card may or may not have the text I'm looking for. So, I can't specify a particular field and retrieve its text as Marielle suggested.
I probably have bad habits left over from HyperCard and I'm just going to have to re-think how I do things - but I sure wish I could lock that screen.
Doug
Thanks for your further comments.
The problem is I want the other windows to always be visible so the user can see them and can click on any chosen one to bring it forward. Thus, "go invisible stack..." won't do as it makes the stack dissappear (or flash momentarily if I immediately set it visible again).
Also, I need to do a "Find", i.e., I don't know in advance which field on which card may or may not have the text I'm looking for. So, I can't specify a particular field and retrieve its text as Marielle suggested.
I probably have bad habits left over from HyperCard and I'm just going to have to re-think how I do things - but I sure wish I could lock that screen.
Doug