On 14/05/2012, at 3:01 PM, Roland King wrote: > I'm confused. What's the method stringValue on theSudokuTextField? That's one > of your methods right as stringValue is a method on NSNumber AFAIK. What does > it do? > > You're setting the attributedStringValue and the getting the stringValue, in > what way are they related?
Well, they are related, but perhaps you stumbled on the answer anyway. NSTextField inherits -stringValue from NSControl, so that's no problem. But, if you use -setAttributedStringValue:, you should use -attributedStringValue to retrieve it. Internally, I do not believe that NSControl automatically reduces an attributed string to an ordinary string, but maintains them as totally separate values. If there is an attributed string to display, it will take that over a plain string, but it does not provide any conversion between them. --Graham _______________________________________________ Cocoa-dev mailing list ([email protected]) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
