Answer function

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8414
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Answer function

Post by FourthWorld » Sun Nov 15, 2020 4:36 am

dunbarx wrote:
Sun Nov 15, 2020 3:53 am
Or did I miss the fact that a stackInUse (library stack) was necessary to see the oddities of the last five pages?
Yes, at least in the IDE, where the Ask and Answer stacks are each in their own stackfile.

You know the message path well; after a message reaches the stack it goes to the engine...

... unless you have a script acting globally, such as a library or a backscript.

The stacksInUse refers to those stacks that have been brought into use as libraries. Anything listed there is global in scope, such as a library with a mouseDown handler.
Richard Gaskin
LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

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

Re: Answer function

Post by dunbarx » Sun Nov 15, 2020 4:46 am

Richard. Mark.
Craig- yes, that's the whole point of this topic.
There were NO stacksInUse in the simple test I just posted. I am in the IDE. My point was that messages, crippled in odd ways, are being sent to the card. The very card (and owning stack) that i thought was being bypassed and trapped exclusively in a library stack.

I am obviously not getting it, but it seems like you are having it both ways.

Do we agree then that a modal dialog "leaks", "sends", whatever, messages to the card? Tell me this also is so, and I will shut up.

Craig

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8414
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Answer function

Post by FourthWorld » Sun Nov 15, 2020 4:51 am

IIRC mouseMove is sent to any open stack the mouse is within, no?
Richard Gaskin
LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3211
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Answer function

Post by mwieder » Sun Nov 15, 2020 5:35 am

stam- the ask and answer dialog stacks are launched as separate stacks. The mouseDown etc messages don't get passed to the (visually) underlying stack because it's a separate stack, so no longer in the message path of the dialogs.

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3211
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Answer function

Post by mwieder » Sun Nov 15, 2020 5:36 am

Richard- even in a standalone the ask and answer dialogs are separate stacks. They're launched as modal stacks no matter what environment.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 8414
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Answer function

Post by FourthWorld » Sun Nov 15, 2020 7:48 am

mwieder wrote:
Sun Nov 15, 2020 5:36 am
Richard- even in a standalone the ask and answer dialogs are separate stacks.
Yes, but they get copied into the mainstack designated as the standalone, so the message path for them then incorporates the mainstack as it would for any other substack, no?
Richard Gaskin
LiveCode Community Liaison

LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

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

Re: Answer function

Post by dunbarx » Sun Nov 15, 2020 6:31 pm

IIRC mouseMove is sent to any open stack the mouse is within, no?
Well, so do "mouseEnter" and "mouseLeave", being sent to the card. These messages are sent continuously while the dialog is open, if you move the cursor appropriately.

Craig

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3211
Joined: Mon Jan 22, 2007 7:36 am
Location: Berkeley, CA, US
Contact:

Re: Answer function

Post by mwieder » Sun Nov 15, 2020 7:01 pm

Richard-

A little experimenting here deepens the mystery:

In a standalone the ask and answer dialogs are still launched as separate stacks, so no... the underlying stack is not part of the message path. This is what I expected, so no surprise there.

But... the mouseDown message is *not* passed on the the library stack in a standalone, only in the IDE. I'm finding that a bit distressing and trying to wrap my head around a) what message-passing mechanism is or isn't coming into play and b) what kind of design decision went into that distinction and c) what the repercussions of that are for us as developers expecting standalones to act like our development environment.

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”