• 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: Dragging multiple AB record
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dragging multiple AB record


  • Subject: Re: Dragging multiple AB record
  • From: Stefan <email@hidden>
  • Date: Fri, 25 Aug 2006 17:33:31 +0200


You need to seperate the pasteboard's content into separate vCards and apply your code to each vCard string.

Am 25.08.2006 um 12:54 schrieb email@hidden:

I am trying to drag more than one record from the Address Book to my
table and then read each record to fill in the table. Below is code
that will read the first record but how do I get at muliple records
dragged to the table.

- (BOOL)tableView:(NSTableView*)table acceptDrop:(id
<NSDraggingInfo>)sender
row:(int)dropRow dropOperation:(NSTableViewDropOperation)operation;
{
NSPasteboard *pb = [sender draggingPasteboard];
NSString *firstName;
NSString *lastName;

if (table == [self _phoneBookTable]) {
ABPerson *droppedPerson = [[[ABPerson alloc]
initWithVCardRepresentation:[pb dataForType:NSVCardPboardType]]
autorelease];
firstName = [droppedPerson valueForProperty:kABFirstNameProperty];
lastName = [droppedPerson valueForProperty:kABLastNameProperty];
}
}

_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Dragging multiple AB record (From: email@hidden)

  • Prev by Date: Re: import Header??
  • Next by Date: Re: import Header??
  • Previous by thread: Dragging multiple AB record
  • Next by thread: import Header??
  • Index(es):
    • Date
    • Thread