Re: Right way to build style sheets?
Re: Right way to build style sheets?
- Subject: Re: Right way to build style sheets?
- From: Jonathan Chaffer <email@hidden>
- Date: Wed, 13 Nov 2002 15:20:16 -0500
On Wednesday, November 13, 2002, at 02:54 PM, Steve Mykytyn wrote:
I need to keep a list of styles for text: font, size, style, color,
etc.
<snip>
So i suppose the next best thing would be to make a subclass of NSView
that responded to the various text attribute selectors...
When I needed a widget to do this I implemented an NSControl that
stored an NSFont and responded to font changes from the font manager.
- (void)changeFont:(id)sender
{
NSFont *oldFont = [self fontValue];
NSFont *newFont = [sender convertFont:oldFont];
[self setFontValue:newFont];
[super sendAction:[self action] to:[self target]];
} // changeFont:
The sendAction there allows a change in font to trigger a change in the
interface elsewhere.
--
Jonathan Chaffer
Applications Developer, structure:interactive
(616) 364-7423
http://www.structureinteractive.com/
_______________________________________________
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.