Re: is this string styled?
Re: is this string styled?
- Subject: Re: is this string styled?
- From: Ricky Sharp <email@hidden>
- Date: Sat, 7 Jan 2006 10:35:12 -0600
On Jan 7, 2006, at 10:27 AM, Camillo Lugaresi wrote:
On 07/gen/06, at 16:49, Matt Neuburg wrote:
But what *is* the 'default attribute set'? As I said, when I make an
attributed string with initWithString, its attribute dictionary is
empty.
That's the problem. m.
Like I said, that depends on the application (eg. a default font
setting in the preferences). If the default in your application is
to just use what NSTextView provides, then you can get the
attributes dictionary from the textview in awakeFromNib and save it
somewhere.
Having an application-specific default is one option.
From the NSAttributedString doc:
"Note that the default font for NSAttributedString objects is
Helvetica 12-point, which differs from the Mac OS X system font
Lucida Grande, so you may wish to create the string with non-default
attributes suitable for your application using, for example,
initWithString:attributes:."
If you really wish to use the system default, I'm not sure why you
can't deal with the empty dictionary. If you really need a non-empty
dictionary, I suppose one containing the following objects would give
you the same outcome:
[NSFont userFontOfSize:0]
[NSParagraphStyle defaultParagraphStyle]
___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com
_______________________________________________
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