• 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: ABAddressBook anomaly.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ABAddressBook anomaly.


  • Subject: Re: ABAddressBook anomaly.
  • From: David Remahl <email@hidden>
  • Date: Thu, 14 Nov 2002 00:36:54 +0100

+(NSArray*)properties is a CLASS-method as opposed to an INSTANCE-method.
That means that you cannot send it to an instance of the class, but need to
direct it to the class itself:

NSArray *props = [ABPerson properties];

Notice how subtley the error message is actually telling you this:
-[ABPerson properties]: selector not recognized (note the '-'-sign before
the square brackets. The header specifies a '+' sign).

/ Sincerely, David Remahl

> Hello,
>
> I'm currently learning to use the ABAddressBook framework.
>
> In my Tester app, I have this code:
>
> - (void)awakeFromNib {
> NSArray *anArray = [[ABAddressBook sharedAddressBook] people];
> NSLog(@"%@",[[anArray objectAtIndex:20] properties]);
> }
>
> After launching, the app crashes on
> NSLog(@"%@"[[anArray objectAtIndex:20] properties]);
>
> 2002-11-13 18:15:44.000 ABAddressBook Example[1743] *** Uncaught
> exception: <NSInvalidArgumentException> *** -[ABPerson properties]:
> selector not recognized
>
> ABAddressBook Example has exited due to signal 5 (SIGTRAP).
>
> Yes, the twentieth object in the array is valid.
> This is kind of odd because if you look in the framework headers,
> you'll read this code
> In ABAddressBook/ABPerson.h
>
> @interface ABPerson (ABPerson_Properties)
> ...
> + (NSArray *)properties;
> ...
> @end
>
> Can anyone help me?
>
> --Jean-Olivier
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >ABAddressBook anomaly. (From: "Jean-Olivier Lanctôt-D." <email@hidden>)

  • Prev by Date: Re: ABAddressBook anomaly.
  • Next by Date: NSMutableString & re-initing...
  • Previous by thread: Re: ABAddressBook anomaly.
  • Next by thread: NSMutableString & re-initing...
  • Index(es):
    • Date
    • Thread