I recently had a couple people test my app, and one of them always gets the following error whenever they launch the app or click a button that adds tasks to a table:
Applescript Error
Invalid date and time date. (-30720)
I can’t re-create the problem, but I did notice that they use the UK time style, whereas I use the US style. Are there any particular things I need to be aware of in regards to short date strings and other date-related applescript commands? I’m assuming the problem lies somewhere in them, but I’m not really sure. So, has anyone else encountered this problem, or do you know how to solve it? The app itself can be downloaded here, and I can post the source if necessary. Any and all help is greatly appreciated.
Can’t solve a code problem without some code.
Post source.
Here you go.
The files that involve dates are Document, Export, and Toolbar. Just let me know if you’ve got any other questions.
You can recreate the problem: switch your own date to their time zone in “Date & Time” pref panel’s “Open International”
I tried that already, and I still can’t recreate the problem - it seems to work just fine.
I don’t see anything particularly obvious here. Nothing that jumps up and shouts, “HEY I’M BROKEN,” at any rate. (Though, it’s a bit late.)
My suggestion would be to add some logging to the functions you use that ask for or talk to date objects, have people who are seeing the issue run it, and then get them to report back to you. An alternate solution might be to add some breakpoints and have them run your app in the debugger if they’re savvy enough to get good information back to you.
Alright - I figured it out. As it turns out, I was trying to fix the wrong button. The real problem was that the button in question added a blank task, including nothing for the date field. Obviously, nothing isn’t a valid date or time, so it gave the error. Sorry for wasting everybody’s time, but thanks for trying.
Ask yourself a question:
If you had not posted here, would you have gone back and found the problem as quickly?
If not, then you didn’t waste anyone’s time.