cancel pending message?

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

Post Reply
marksmithhfx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 931
Joined: Thu Nov 13, 2008 6:48 am

cancel pending message?

Post by marksmithhfx » Mon Jan 31, 2022 6:07 pm

Hi folks,

I have a field and two handlers that are triggered by exiting the field: CloseField that is triggered if you make changes to the field (and exit) and ReturnInField which is triggered if you just leave the field (without making changes, using the return key). But in fact, if closeField is triggered ReturnInField is also triggered and that is not the behavior I want. What it boils down to is this; if CloseField is triggered I want to prevent ReturnInField from being executed. Any suggestions on how I might do that? I took a look at the pending messages but there was nothing in there that looked remotely connected with ReturnInField.

Thanks,

Mark
macOS 12.6.5 (Monterey), Xcode 14.2, LC 10.0.0, iOS 15.6.1
Targets: Mac, iOS

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

Re: cancel pending message?

Post by dunbarx » Mon Jan 31, 2022 6:19 pm

You should use "exitField" to send a message if you have NOT changed anything.

Craig

Post Reply