Staying on a field
Bill Vlahos
bvlahos at mac.com
Wed May 4 03:07:16 EDT 2011
Pete,
It is in the dictionary under "is a" and "is not a". Date is one of the many options.
* date if it is in one of the formats produced by the date or time functions
Bill Vlahos
_________________
InfoWallet (http://www.infowallet.com) is about keeping your important life information with you, accessible, and secure.
On May 3, 2011, at 11:26 PM, Pete wrote:
> Folks,
> Not strictly related to this but what date format does the syntax "if this
> is not a date" use? And where is it documented that "a date" is a valid
> expression? Just curious since I've spent several hours writing code to try
> to validate a date based on the user's system settings and I've never seen
> mention of this anywhere
>
> Thanks,
> .
> Pete
> Molly's Revenge <http://www.mollysrevenge.com>
>
>
>
>
> On Tue, May 3, 2011 at 9:44 PM, Joe Lewis Wilkins <pepetoo at cox.net> wrote:
>
>> Bill,
>>
>> I'd try eliminating the exit closeField and the pass closeField from your
>> handler as a first effort. I don't think either are needed in this case and
>> may confuse the "focus" issue.
>>
>> HTH,
>>
>> Joe Lewis Wilkins
>> Architect & Director of Product Development for GSI
>> <www.glsysinc.com>
>>
>>
>> On May 3, 2011, at 9:14 PM, Bill Vlahos wrote:
>>
>>> I do a validity check on a field to see if the user entered a valid date.
>> If the user entered a valid date and presses TAB or RETURN the focus moves
>> on to the next field. However, if the user enters an invalid date I want to
>> keep the focus on the field to try again.
>>>
>>> This field script does everything correctly except that it doesn't set
>> the focus back on the field. What am I doing wrong?
>>>
>>> on closeField
>>> if me is not a date then
>>> answer error "Not a valid date. Retry?" with "No" or "Yes"
>>> if it is "Yes" then
>>> focus on me
>>> exit closeField
>>> end if
>>> end if
>>> pass closeField
>>> end closeField
>>
>> _______________________________________________
>> 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
>>
>>
> _______________________________________________
> 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