FROM : Douglas Davidson
DATE : Mon Apr 25 22:37:48 2005
On Apr 25, 2005, at 1:30 PM, Roland Silver wrote:
> how do I output a message to an NSTextView in a progammatically
> specified font? setFont is a method of
> NSActionCell ← NSCell ← NSObject,
> but
> NSTextView ← NSView ← NSResponder ← NSObject,
> so an NSTextView and an NSActionCell have no closer ancestor than
> NSObject.
>
Both your attributions and your hierarchies are missing something.
setFont: is also a method of NSText, the immediate superclass of
NSTextView. There are also other relevant methods like
setFont:range:; for more control, remember that the text is stored in
an NSTextStorage, which is a subclass of NSMutableAttributedString.
Douglas Davidson
DATE : Mon Apr 25 22:37:48 2005
On Apr 25, 2005, at 1:30 PM, Roland Silver wrote:
> how do I output a message to an NSTextView in a progammatically
> specified font? setFont is a method of
> NSActionCell ← NSCell ← NSObject,
> but
> NSTextView ← NSView ← NSResponder ← NSObject,
> so an NSTextView and an NSActionCell have no closer ancestor than
> NSObject.
>
Both your attributions and your hierarchies are missing something.
setFont: is also a method of NSText, the immediate superclass of
NSTextView. There are also other relevant methods like
setFont:range:; for more control, remember that the text is stored in
an NSTextStorage, which is a subclass of NSMutableAttributedString.
Douglas Davidson
| Related mails | Author | Date |
|---|---|---|
| Roland Silver | Apr 25, 22:30 | |
| Nick Zitzmann | Apr 25, 22:37 | |
| Douglas Davidson | Apr 25, 22:37 | |
| Shawn Erickson | Apr 25, 22:41 | |
| Stéphane Sudre | Apr 25, 22:42 |






Cocoa mail archive

