Found It! - IDE Save File Dialog

J. Landman Gay jacque at hyperactivesw.com
Tue Apr 27 17:40:24 EDT 2004


On 4/27/04 3:55 PM, David Burgun wrote:

> Ok, it's a bit worse than that, it seems that the "openField" message 
> gets sent just because the field is "Focusable" not because the user 
> clicked in it, I am guessing that it gets sent to the first "Focusable" 
> field of a card, although I just cannot figure out why this happens in 
> one stack and not another! Anyone know?

Yes. The first control (that is, the control with the lowest layer) 
which also has its traversalOn property set to true will automatically 
be focused when a card opens. If this is a button, you won't get the 
message. If it is an editable field, you will.

Since all controls on Windows can be focused, the trick is to make sure 
that the lowest-level, traversalOn control is a button. On a Mac, 
however, buttons cannot receive focus and the first editable field will 
receive focus instead. On Macs, you have to use a hack -- either make 
sure none of your fields are focusable, or else hide an editable field 
offscreen somewhere whose layer is set to 1. Then that hidden field gets 
the focus and your card looks untouched.

For your problem though, the hack won't help because the offscreen field 
will receive focus and trigger messages anyway. So you may just have to 
go with the openField handler you wrote.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com


More information about the use-livecode mailing list