• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSContainerSpecifierError in Address Book
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSContainerSpecifierError in Address Book


  • Subject: NSContainerSpecifierError in Address Book
  • From: Rob Lewis <email@hidden>
  • Date: Sat, 18 Mar 2006 18:48:26 -0800

Glad I stumbled on Paul's post. Coincidentally, I just wrote a Now Contact to Address Book exporter. It worked fine on my file of 2300 contacts, but another user got the "NSContainerSpecifierError" after only about 250 contacts. I figured it was a corrupted Now Contact file. 

Questions: what kind of statement generates the error? Is there an error number to look for, or just any error? What sort of user "modification" of a troublesome contact fixes the problem? Any code snippets appreciated. 

And I have filed a bug report. 

On Mar 18, 2006, at 12:00 PM, email@hidden wrote:

------------------------------


Message: 2

Date: Sat, 18 Mar 2006 10:20:34 -0800

From: Paul Berkowitz <email@hidden>

Subject: Re: NSContainerSpecifierError?

To: AppleScript-Users <email@hidden>

Message-ID: <C0418F72.C80AB%email@hidden>

Content-Type: text/plain; charset="US-ASCII"


On 3/16/06 7:08 PM, "Robert Nicholson" <email@hidden> wrote:


So I'm trying to import addresses from a file that's in a format

similar to Entourage's exported format. and after importing 25

addresses I get the above error in Address Book.


What is that?


I am basically importing all the email addresses on my whitelist so

that I can colorize the messages from  people I recognise in Mail.app


It's similar to the notorious NSReceiverEvaluationScriptError 4. Basically,

it just means that Address Book's scripting is flaky.


More specifically, it seems to mean that when your script tries to set a

property of an object ('person') that the script just created, it can't find

the object that it just finished creating. It can't find the Container for

the property, although it's there. It's not updating the database in time.

Even if you could afford to throw in that absurd 'save addressbook' command

before every command you give to Address Book, it probably wouldn't help

here, since this error seems to occur even for a


    make new person with properties {...}


command. You'd have to


    set p to make new person

    save addressbook

    set first name of p to "blah"

    set last name of p to "blah"

    ...etc

    ...etc.

    ...etc.

    save addressbook -- again and again and again


This is too ridiculous to contemplate as a workaround. Instead, you need to

add some code to set all the properties of existing persons to what you're

importing, and when you it this problem, run the script again so it will

update them. Or something similar. Also very messy.


This problem  - all the NSReceiverEvaluationScriptError  and

NSContainerSpecifierError errors - got much much worse in Tiger. It was very

rare in Panther.


Unfortunately, it's not 100% replicable, so it makes it hard to submit a Bug

Report. But please do so. The more of us bug this. maybe they'll fix the

fragility of Address Book scripting.


I sell a shareware app that syncs Entourage contacts to Address Book

contacts. On the first run, about 25% of users report these errors! Maybe

more - I now have a built-in error note that itemizes which contacts hit

these two errors, and tells them to modify the Entourage contacts concerned

and re-run the script. That always works. But it's absurd that it should

happen so often.


-- 

Paul Berkowitz





------------------------------


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Printer Setup Utility scripting??
  • Next by Date: Why doesn't this work in Address Book?
  • Previous by thread: Re: Couple of Applescript questions....
  • Next by thread: Why doesn't this work in Address Book?
  • Index(es):
    • Date
    • Thread