Re: [coredata] populate NSPopupButton with NSAttributedStrings
Re: [coredata] populate NSPopupButton with NSAttributedStrings
- Subject: Re: [coredata] populate NSPopupButton with NSAttributedStrings
- From: Jim Correia <email@hidden>
- Date: Sat, 7 Jul 2007 11:11:21 -0400
On Jul 7, 2007, at 10:41 AM, Pierre Chatel wrote:
I'm binding a NSPopupButton to a core data controller but it
refuses to
display NSAttributedStrings.
We have a terminology problem. The controllers aren't Core Data
specific, but can be used with Core Data. As such, they are just
controllers, not Core Data controllers. For your question below, it
really doesn't matter if the data comes from an NSManagedObject or not.
I have implemented a method to return a NSAttributedString (image +
string)
in my NSManagedObject subclass and call this method from the
'contentValues'
binding of the NSPopupButton but it displays gibberish when I
launch the
application.
What specific gibberish are you seeing?
If you look at the documentation for the contentValues binding of
NSPopUpButton, it expects you to give it a string, not an attributed
string.
<http://developer.apple.com/documentation/Cocoa/Reference/
CocoaBindingsRef/BindingsText/NSPopUpButton.html>
Jim
_______________________________________________
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:
This email sent to email@hidden