closeField and exitField problem

Björnke von Gierke bvg at
Mon Oct 15 15:30:42 EDT 2007

Yes, I too think that validating user entries is one of rev's 
weaknesses. However, artificially increasing the problem by not using 
the fields as data source seems a bit strange to me, especially with 
your reasoning.

How are these two lines completely different in their horribility?

put field 1 of card 1 into x
put the field1oncard1 of this stack into x

If you're really that much into customprops, you can put the fields 
into them when you leave the card. or with a send in time message, or 
on mousemove, or ...

More likely is that i didn't understand the problem you have correctly, 
so maybe you should explain it in a different way.


On 15 Oct 2007, at 20:48, Dave wrote:

> Hi,
> I asked about this problem ages ago, but didn't get a response, so I'm 
> asking again as it's just come up again!
> I am running on a Mac. If the user fills in a field and then tabs out 
> of the field, either a closeField or exitField message is sent to the 
> field. All well and good. However, if the user clicks on a button, 
> nether messages are sent!
> This is supposedly normal behavior since from the docs:
> "If the lookAndFeel property is set to "Macintosh", the closeField 
> message is generally not sent when another control (such as a button) 
> is clicked. This is because clicked buttons do not receive the focus 
> on Mac OS systems, and therefore the selection remains active."
> (incidentally, in this case the "lookAndFeel" and feel property is set 
> to "Appearance Manager", so according to the above it should still 
> send the message(s).)
> This effectively means that it\s impossible to ensure that a field is 
> valid using these messages, so what's the use of having them or am I 
> missing something.
> I want to let the user enter a number of fields and then when the user 
> clicks the button, I check to see if they are valid and if not put if 
> an error message. The problem is that the three field must be examined 
> together, so I'd like to be able to store the contents of each field 
> in a custom property of the stack and then check them in the mouseUp 
> handler of the button. I can't really access the fields directly (as 
> is put field "XXX" into whatever) since the check may be run on a 
> different card and it's really horrible to access fields like that.
> Any ideas or suggestions would be greatly appreciated!
> All the Best
> Dave

More information about the Use-livecode mailing list