Re: Address Book scripting bug
Re: Address Book scripting bug
- Subject: Re: Address Book scripting bug
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 27 May 2004 11:45:27 -0700
On 5/27/04 9:45 AM, "Michelle Steiner" <email@hidden> wrote:
>
I just reported the following bug to Apple:
>
>
The applscript expression "date string of creation date of person 1"
>
results in "NSCannotCreateScriptCommandError"
>
>
However, the following works:
>
set foo to (creation date of person 1)
>
date string of foo
>
>
This means that you can't have this construct:
>
>
tell Application "Address Book"
>
set TodaysPeople to the people whose (date string of creation date)
>
is date string of (current date)
>
end tell
It's just how Address Book and other Cocoa apps work. There are about a
million "bugs" like this, if you want to consider it a bug.
Just do
date string of (get creation date of person 1)
for the first.
It's true you can't do whose clauses when a property of a property is
required like this. That's not a bug, just a limitation. As a workaround:
set today to date (date string of (current date))
tell application "Address Book"
set TodaysPeople to the people whose creation date > today
end tell
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.