NSTokenField - drag and drop contacts from Address Book panel
NSTokenField - drag and drop contacts from Address Book panel
- Subject: NSTokenField - drag and drop contacts from Address Book panel
- From: Sarat Kongara <email@hidden>
- Date: Tue, 20 Dec 2005 16:04:35 -0800
Hi,
I have a window with two NSTokenFields (To: and From:) and I like to be able
to drag and drop contacts from the Address Book panel to these token fields.
I registered the draggedTypes.
[fromField registerForDraggedTypes:[NSArray
arrayWithObject:@"ABPeopleUIDsPboardType"]];
[toField registerForDraggedTypes:[NSArray
arrayWithObject:@"ABPeopleUIDsPboardType"]];
I set a controller object as the delegate of the token fields and
implemented the token field delegate method.
- (NSArray *)tokenField:(NSTokenField *)tokenField
readFromPasteboard:(NSPasteboard *)pboard
This method never gets called.
I searched the mailing list to see how to implement drag and drop for
NSTextFields. I found this useful link
http://www.cocoabuilder.com/archive/message/cocoa/2002/7/9/55542 (the idea
is to create a subclass of NSTextField and a subclass of NSTextView for the
custom field editor)
I tried the same approach for NSTokenFields but it doesn't seem to work. I
found this link to confirm it.
http://www.cocoabuilder.com/archive/message/cocoa/2005/7/8/141077
Any suggestions on how to do implement this? Thanks.
Sarat
_______________________________________________
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