----------------------------------------------------------------------
Message: 1
Date: Thu, 17 Dec 2009 13:42:58 -0400
From: Jim Marsh <
email@hidden>
Subject: Re: date works with literal, but not otherwise
To:
email@hiddenMessage-ID: <
email@hidden">
email@hidden>
Content-Type: text/plain; charset="us-ascii"
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.apple.com/pipermail/applescriptobjc-dev/attachments/20091217/c299527d/attachment.html------------------------------
_______________________________________________
Applescriptobjc-dev mailing list
email@hiddenhttp://lists.apple.com/mailman/listinfo/applescriptobjc-dev
End of Applescriptobjc-dev Digest, Vol 2, Issue 2
*************************************************