Re: OK, but what do 'attributes' look like?
Re: OK, but what do 'attributes' look like?
- Subject: Re: OK, but what do 'attributes' look like?
- From: Denis Stanton <email@hidden>
- Date: Tue, 9 Mar 2004 18:37:31 +1300
Hi Dave
On Tuesday, March 9, 2004, at 05:32 PM, Dave Keck wrote:
Look at the constants for NSAttributedString Additions.
Thanks for helping, and for the rapid response.
I'm sure you're on the right track, but without an example I haven't
quite got it yet.
I tried looking at NSAttributedString already and came up with:
[myString drawInRect: myRect with attributes: [NSDictionary
dictionaryWithObject @"Helvetica 9-point" forKey: NSFontAttributeName]];
I got the "Helvetica 9-point" part from the example constants defined
for NSAttributedString Additions.. It looks surprisingly like natural
language when I would have expected separate dictionary items for font
name and size.
The compiler was happy, but at run time I got an error:
*** -[NSConstantString pointsize]: selector not recognized
Denis
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.