Problem with focusIn and a substack
Bill Vlahos
bvlahos at mac.com
Sat Jul 26 20:05:33 EDT 2008
I have a field that when a user clicks on it a calendar picker stack
appears to let the user click on a date. The field is locked to allow
the mouseUp to work. The script below works fine when the user clicks
on the field. The date is selected from the popup and put into the
field.
It is also possible for the user to tab into the field from the
previous field so I added the focusIn handler. If I uncomment "click
at the loc of me" the calendar stack shows up but when the user
selects the date it doesn't go into the field.
How do I get both to work?
on mouseUp
put "SmallCalendar" into tStackName
put me into theDate
put theDate into theOldDate
convert theDate from short system date to short English date
put getDate(theDate, tStackName) into theDate
if theDate is theOldDate then exit to top
if theDate is "clear" then
put empty into me
else
convert theDate from short English date to short system date
put theDate into me
end if
closeField
end mouseUp
on focusIn
-- click at the loc of me
end focusIn
Bill Vlahos
More information about the use-livecode
mailing list