Okay so the solution is send in time. This apparently allows the engine to 
complete the closing of the field and then set the focus on the next field. 
Simply moving the closeField handler out of the field and into the card script 
did not do the trick. I am curious however, to know what gets executed first, 
the next objects openField handler, or the closeField handler in the card 
script. My money is on the openField handler! What an odd situation that would 
be then, that an openField handler gets executed before a closeField handler 
completes! 

Since the issue also occurs when selecting a tool, I’m going to hazard a guess 
and say that the focus of the field is not changing because the modal nature of 
the answer dialog interrupts the normal process of closing the field. 
Apparently, unless the closeField handler is allowed to terminate 
uninterrupted, it fails to complete. This also explains why in my test stack, 
tabbing out of the field to another field doesn’t actually happen. The focus 
remains on the original field, as is indicated by the focus border. 

Not sure if this is intended or not, so I am reticent to submit this as a bug. 
Also, It seems to me to be a fundamental engine modification which could have 
far reaching affects on existing projects. At any rate, thank you all for the 
workaround. It is passable, and in the end, all that really matters is that the 
application *appears* to work as intended. :-)

Bob


On Mar 21, 2014, at 08:45 , Bob Sneidar <[email protected]> wrote:

> Kay, I’ll give your solution a try. Richard, I will attempt to do that. 
> 
> Bob
> 
> 
> On Mar 20, 2014, at 23:08 , Kay C Lan <[email protected]> wrote:
> 
>> On Fri, Mar 21, 2014 at 11:53 AM, Bob Sneidar
>> <[email protected]>wrote:
>> 
>>> I know this has come up in the past, because I remember the poor fellow
>>> who was struggling with it.
>>> 
>>> I have a field with a closeField handler. In the handler there is an
>>> answer dialog command which the user must respond to.
>>> 
>> 
>> Sorry I don't know how to put links do old posts, but if you search for
>> "What's is wrong with this Script logic" you'll find a work around.
>> Basically something like this:
>> 
>> on closefield
>> send "hCheckEntry me" to me in 1
>> end closefield
>> 
>> on hCheckEntry pData
>> repeat until pData is an integer
>>   if the shiftkey is down then exit to top
>>   ask warning "Please enter only whole numbers!" with pData \
>>         titled "Enter A Number"
>> 
>>   if the result = "cancel" then exit to top
>>   put it into pData
>> end repeat
>> put pData into me
>> end hCheckEntry

_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to