closeField and exitField problem

Dave dave at looktowindward.com
Mon Oct 15 14:48:36 EDT 2007


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