• 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: ABPerson is a Person or a Company
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ABPerson is a Person or a Company


  • Subject: Re: ABPerson is a Person or a Company
  • From: Ken Ferry <email@hidden>
  • Date: Sun, 15 Feb 2004 22:01:01 -0500

Hi Alex,

This should do it:

ABPerson *person; // assume this is set
int showAsFlags;

showAsFlags = [[person valueForProperty:kABPersonFlags] intValue] & kABShowAsMask;
if (showAsFlags == kABShowAsCompany)
{
// ..
}
else if (showAsFlags == kABShowAsPerson)
{
// ..
}

-Ken

On Feb 14, 2004, at 2:38 AM, Alexander F. Hartner wrote:

Hi all,

This must come across really silly but I am looking for an example on
how to check if an ABPerson is a company or a person. I know that I
have to use the kABPersonFlags, kABShowAsPerson and kABShowAsCompany
constants, but how ? Anyone got any examples.

Thanks
Alex
_______________________________________________
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.
_______________________________________________
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: 
 >ABPerson is a Person or a Company (From: "Alexander F. Hartner" <email@hidden>)

  • Prev by Date: Re: calling method via IMP that returns non id type - compiler warning
  • Next by Date: Re: [NSString UTF8String] performance
  • Previous by thread: ABPerson is a Person or a Company
  • Next by thread: Re: ABPerson is a Person or a Company
  • Index(es):
    • Date
    • Thread