Page 1 of 1

Complete Newbie needs help

Posted: Mon Mar 04, 2013 9:28 pm
by dunbarx
Feel like it sometimes.

Make two stacks ("main1" and "main2") Put a button on "main1"

Put this into the button script:

Code: Select all

on mouseUp
   go stack "main2"
   go stack "main1"
end mouseUp
Terrific. Look, it blinks!

Now this:

Code: Select all

on mouseUp
   lock screen
   go stack "main2"
  --unlock screen
   go stack "main1"
end mouseUp
focus stays on "main2"

Unlocking the screen (commented out above) just before returning makes it work as advertised. So what?

HC does not do this. What have I forgotten? Or rather, what did I not learn? Don't talk to me about the dictionary.

Craig Newman

Re: Complete Newbie needs help

Posted: Mon Mar 04, 2013 9:45 pm
by magice
You sir are FAR from a newbie. That said, it works fine for me without commenting out the unlock. I am using 3.0 so maybe it is a bug that has cropped up since then.

Re: Complete Newbie needs help

Posted: Mon Mar 04, 2013 10:03 pm
by dunbarx
Magice.

Did you say "without commenting out" the unlock? Meaning that the "unlock" line is in the script? If so, that works. It is without the explicit "unlock" that focus lingers on the target stack. And it should not.

Newbie is as newbie does.

Craig

Re: Complete Newbie needs help

Posted: Tue Mar 05, 2013 9:43 am
by magice
I was looking at it wrong. Actually, it hangs on main2 for me whether the unlock is commented or not. In fact the first script without the lock hangs on main2 as well. It brings main 1 to the front, so I was thinking it has focus, but the frame is still the lighter color and the window buttons are disabled.