Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSComboBox Suggestions




On Oct 22, 2007, at 3:23 PM, Martin Redington wrote:

Is the behaviour of Apple Mail's To Field what you're after?

That should give you some clues as to how to make it Mac like, although I've never looked at the implementation.

I'd actually like a To: control like that in one of my apps, but I've not been able to find a pre-rolled one (that handles the email address retrieval as well).

NSTokenField (new in 10.4) supports auto-completion drop-downs through delegate methods. It holds/edits an array of your custom objects. It can display those Apple Mail address field blue lozenges, but I just noticed that NSTokenStyle constant NSPlainTextTokenStyle (no lozenge) might work for Mike's database app. Even if you don't use it, you might get a design pattern idea from it.


Like Martin implies, for "To field" use, I had to write my own access to the Address Book, and other things, that took about 400 lines of code and a lot of time. As I recall, ABPicker has a lot more "for free" re Address Book access if you don't mind its interface.

--Paul Collins

** Gracion Software LLC                   http://www.gracion.com/

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >NSComboBox Suggestions (From: "Mike Cahill" <email@hidden>)
 >Re: NSComboBox Suggestions (From: Martin Redington <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.