• 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
Re: NSContainerSpecifierError?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSContainerSpecifierError?


  • Subject: Re: NSContainerSpecifierError?
  • From: Robert Nicholson <email@hidden>
  • Date: Sun, 19 Mar 2006 09:20:18 +0700

Yeah

I decided to just create a file that was in the format Address Book uses to import and avoid Applescript all together. That's a lot faster obviously.

On Mar 19, 2006, at 1:20 AM, Paul Berkowitz wrote:

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 (Applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
40elastica.com


This email sent to email@hidden
_______________________________________________
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


References: 
 >Re: NSContainerSpecifierError? (From: Paul Berkowitz <email@hidden>)

  • Prev by Date: Couple of Applescript questions....
  • Next by Date: Re: Printer Setup Utility scripting??
  • Previous by thread: Re: NSContainerSpecifierError?
  • Next by thread: Say command using "Organ" doesn't work
  • Index(es):
    • Date
    • Thread