Complete Newbie needs help

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Complete Newbie needs help

Post by dunbarx » Mon Mar 04, 2013 9:28 pm

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

magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

Re: Complete Newbie needs help

Post by magice » Mon Mar 04, 2013 9:45 pm

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.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10331
Joined: Wed May 06, 2009 2:28 pm

Re: Complete Newbie needs help

Post by dunbarx » Mon Mar 04, 2013 10:03 pm

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

magice
Posts: 457
Joined: Wed Mar 18, 2009 12:57 am

Re: Complete Newbie needs help

Post by magice » Tue Mar 05, 2013 9:43 am

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.

Post Reply