Re: Using NSAppleEventDescriptor with NSDates
Re: Using NSAppleEventDescriptor with NSDates
- Subject: Re: Using NSAppleEventDescriptor with NSDates
- From: Mike Abdullah <email@hidden>
- Date: Sat, 9 Sep 2006 22:30:24 +0100
doh! (and double doh for misspelling your surname before Matt!)
I don't know how I didn't come across this code before. I was
basically searching around strings like:
NSAppleEventDescriptor NSDate
and getting nothing. Oh well. Hopefully, in future someone
searching Google will find this in the archives and therefore that site.
Mike.
On 9 Sep 2006, at 22:09, Matt Neuburg wrote:
On Sat, 9 Sep 2006 18:03:06 +0100, Mike Abdullah
<email@hidden>
said:
This was a thread around 8 months ago. I was looking for a way to
get an NSAppleEventDescriptor of an NSDate. Matt Neuberg suggested a
solution:
Hint: An 'ldt ' (note the space) is a LongDateTime, which is a
signed 64-bit
integer representing the number of seconds since the start of 1904.
You may
find the utilities on this page helpful:
And I have now (finally) achieved this.
The reason I'm posting this is that there is still nothing really
helpful on this on Google
Well, but take a look at Ken Ferry's KFAppleScript code,
downloadable here:
<http://homepage.mac.com/kenferry/software.html>
You'll find that his NSDate category's aeDescriptorValue method
does exactly
what you're after. So it's not exactly as if you had to reinvent
this wheel.
That said, reinventing the wheel is often a better learning
experience! m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
<http://www.amazon.com/gp/product/0596102119>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden