What is wrong with this Script logic?

Kay C Lan lan.kc.macmail at gmail.com
Fri Jan 11 04:03:50 EST 2013


Actually I just went with the simple example from the dictionary:

on closeField
   if (the text of me is not an integer) then
      answer "Please enter only whole numbers!" titled "Enter A Number"
      select the text of me
   end if
end closeField

Still, I do not understand why the IDE is behaving the way it is. It
doesn't seem right to me.

On Fri, Jan 11, 2013 at 4:42 PM, Phil Davis <revdev at pdslabs.net> wrote:
> So don't use closeField.
>
> on keyDown pKey -- or keyUp
>     if pKey is an integer
>     then pass keyDown
>     else answer "Please enter only whole numbers!" -- or you could "beep"
> end keyDown
>
> Phil Davis
>
>
>
> On 1/10/13 10:21 PM, Mark Wieder wrote:
>>
>> Jacque-
>>
>> Thursday, January 10, 2013, 9:39:35 PM, you wrote:
>>
>>> Something's wrong. I think it's the dialog.
>>
>> My guess is that closeField keeps getting triggered.
>>
>
> --
> Phil Davis
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list