Page 1 of 1

Lock Screen fails in going between substacks?

Posted: Tue Apr 17, 2007 5:35 am
by dbowling
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

Posted: Tue Apr 17, 2007 8:57 am
by malte
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

Posted: Tue Apr 17, 2007 9:35 am
by Mark
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:

Code: Select all

push cd
lock messages
go invisible stack "Stack to Search"
find "string"
put the foundChunk into myChunk
unlock messages
pop cd
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

Re: Lock Screen fails in going between substacks?

Posted: Tue Apr 17, 2007 9:39 am
by marielle
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.
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.

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
Would this do the trick?

Posted: Tue Apr 17, 2007 4:16 pm
by FourthWorld
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"

Posted: Wed Apr 18, 2007 3:43 am
by dbowling
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

Posted: Wed Apr 18, 2007 7:53 am
by Mark
Hi Doug,

That's what the go invisible command is for. See my previoust post.

Best,

Mark

Posted: Wed Apr 18, 2007 8:50 am
by marielle
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.
Give a try to the long id stuff and you may discover this isn't as bad as you may think.

Compare

Code: Select all

go card "mycard" of stack "mystack"
put the text of field "myfield" into tText
and

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

Posted: Thu Apr 19, 2007 1:33 am
by dbowling
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