Re: date works with literal, but not otherwise
Re: date works with literal, but not otherwise
- Subject: Re: date works with literal, but not otherwise
- From: Jim Marsh <email@hidden>
- Date: Thu, 17 Dec 2009 13:42:58 -0400
Hi Bernhard,
The reason for the error seems to be that you are returning a date object in your "set myDate1 to date dateString" but it appears you want a string.
I tried this and it worked.:)
set dateString to "Montag, 7. Dezember 2009 00:00:00" set myDate1 to dateString try display dialog "myDate1: " & myDate1 as string on error errText number errNum display dialog errText & " " & errNum end try
Regards, Jim -------------------------------- Hi List
In AppleScriptEditor, the following code displays the correct date
set dateString to "Montag, 7. Dezember 2009 00:00:00" set myDate1 to date dateString try display dialog "myDate1: " & myDate1 as string on error display dialog "ERROR: read myDate1" end try
In AppleScriptObjC however, it displays the ERROR message. When i change the first two lines to one single line:
set myDate1 to date "Montag, 7. Dezember 2009 00:00:00"
There is no Error Message.
I don't quite understand why this is the case. Can anyone help me please?
Thanks, Bernhard |
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden