On closeField and on exitField not firing in list field

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
stam
Posts: 2634
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

On closeField and on exitField not firing in list field

Post by stam » Wed Jul 21, 2021 8:08 pm

Hi all,

I have a tiny interface element that pops up to disclose a couple of fields - i want to update a database if user modifies data, and the obvious choice is using the closeField message.

This works fine for the 'normal' fields.
However one of the fields is formatted as list field/list behaviour. I've got a quick setup for the user to add/delete lines, but no automatic way to update the database, as neither on closeField or on exitField appear to trigger at all for this field.

Similar story for 'normal' field if lockText is set to turn... both of these messages fail as well - understandable for on closeField, but would be nice for on exitField.

Am i missing something?

stam
Posts: 2634
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: On closeField and on exitField not firing in list field

Post by stam » Thu Jul 22, 2021 1:09 am

To answer my own question (for anyone else running into this issue) it looks like any field that has text locked (which includes list fields) will not generate openField, closeField or exitField messages.
I was able to get round this by using the focusIn and focusOut messages (which weirdly don't seem to be sent by unlocked fields on MacOS at least).

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”