Re: Dragging multiple AB record
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