Drag and drop question.

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

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte » Mon Oct 06, 2008 1:09 pm

Hi Mark,

if you set the constrainRectangular property of an object, AE starts listening to mouseEvents: mouseDown, mouseUp, mouseRelease and mouseMove events in order to perform the drag. In order not to interfer with those messages and yet being able to react on the events involved, I introduced some callback messages, that are being sent to the target. This was done, because I always forget to pass messages, yet want to do something useful when a drag starts or ends, or even while a drag is being performed.

These callbacks are being sent and can be trapped in the targets script or higher up the messagepath, without passing them and thus breaking the operation:

constrainRectangularInit -> mouseDown
constrainRectangularExit -> mouseUp, mouseRelease
constrainRectangularCallback -> mouseMove (while you drag the object)

Hope that explains it.

Cheers,

Malte

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Mon Oct 06, 2008 1:18 pm

Thanks, Malte. I understand it now.

Since properties are that important, I'm thinking, wouldn't it be useful if there were an AE properties inspector?

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte » Mon Oct 06, 2008 1:23 pm

Yes, that indeed would be useful. Want to make it? <g>

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Mon Oct 06, 2008 1:28 pm

I'd be happy to help you out, Malte, but as the inventor of the AE you're definitely more qualified ;-)

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte » Mon Oct 06, 2008 2:00 pm

Hehe.

Well, I add it as a feature request for AE 3.

Cheers,

Malte

Post Reply