• 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
ABPerson does not have interface properties ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ABPerson does not have interface properties ?


  • Subject: ABPerson does not have interface properties ?
  • From: Erik Stainsby <email@hidden>
  • Date: Sat, 14 Jul 2012 19:01:40 -0700

This one has to be pretty simple.
There is a category of ABPerson which provides this interface. So what have I missed ?
OSX, 10.7


#import "RSAppDelegate.h"
#import <AddressBook/AddressBook.h>
#import <AddressBook/ABPerson.h>

@implementation RSAppDelegate

- (void)applicationDidFinishLaunching:(NSNotification *) notification {

	addressBook = [ABAddressBook addressBook];
	// this line works and loads 81 records into the content array...
	//	[peopleArrayController setContent:[addressBook people]];


	for(ABPerson * person in [addressBook people]) {

		NSArray * props = [person properties];		// No visible @interface for 'ABPerson' declares the selector 'properties'

		NSMutableDictionary * d = [[NSMutableDictionary alloc] init];
		for( NSString * propName in props ) {
			[d setObject:[person valueForProperty:propName] forKey:propName];
		}
		[peopleArrayController addObject:d];
	}

	NSLog(@"%s- [d] Number of people records loaded:  %lu", __PRETTY_FUNCTION__, __LINE__, [[peopleArrayController content] count]);
}

@end
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: ABPerson does not have interface properties ? SOLVED
      • From: Erik Stainsby <email@hidden>
  • Prev by Date: Re: NSTableView Sends Null Column to Delegate/DataSource
  • Next by Date: Re: ABPerson does not have interface properties ? SOLVED
  • Previous by thread: Re: Re-targetting URL Handler in users' systems
  • Next by thread: Re: ABPerson does not have interface properties ? SOLVED
  • Index(es):
    • Date
    • Thread