Stack doesn't come to front upon first go to card

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: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
dpatterson
Posts: 24
Joined: Wed Jan 18, 2017 5:38 pm

Stack doesn't come to front upon first go to card

Post by dpatterson » Thu Jan 26, 2017 8:37 pm

Hello.

I have two substacks. One contains a datagrid with a list of customers. The other contains the fields required to edit a customer.
The datagrid has a custom column behavior with a mouseDoubleUp handler for selecting a row. The last thing in that handler is

Code: Select all

go to card "addEdit" of stack "customerAddEdit" 
If the add/edit stack is not open as with

Code: Select all

close card "addEdit" of stack "customerAddEdit" 
double-clicking a row opens the stack but does not make it the active window. The customer list remains the active window.

Actually, the add/edit window appears to be the active window for a fraction of a second and the list window becomes active again.

Once the add/edit window is visible, double-clicking a row in the customers list makes the add/edit window the active window as expected.

Everything that I have been able to find states that the go command makes the target card's stack the active window.

I must be doing something wrong here, somewhere. Hopefully someone out there has run into this before and can point me in the right direction.

TIA,
Dave

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 6614
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Stack doesn't come to front upon first go to card

Post by dunbarx » Fri Jan 27, 2017 4:32 am

Hi.

Is it possible that the second click is bringing you back to the initial stack?

Craig Newman

dpatterson
Posts: 24
Joined: Wed Jan 18, 2017 5:38 pm

Re: Stack doesn't come to front upon first go to card

Post by dpatterson » Fri Jan 27, 2017 6:37 am

Hmm. I would hope not since it's a double-click handler.
It shouldn't fire until after the second mouse up.

Besides, as I said in the original post, this only happens if the target stack isn't already visible.

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”