FROM : Koen van der Drift
DATE : Thu Jan 30 16:36:57 2003
Hi,
I want to customize an NSRuler of a NSScrollView, and from the
documentation I found the method setRulerViewClass. So In MyDocument
I call:
- (void)windowControllerDidLoadNib:(NSWindowController *) aController
{
[super windowControllerDidLoadNib:aController];
NSScrollView *scroller = [myTextView enclosingScrollView];
MyRulerView *ruler;
ruler = [[MyRulerView alloc] init];
[scroller setRulerViewClass: ruler];
[scroller setHasVerticalRuler:YES];
[scroller setRulersVisible:YES];
[ruler release];
}
However, I get an error that scroller doesn't respond to
setRulerViewClass. This is from the docs:
+ (void)setRulerViewClass:(Class)aClass
Sets the default class to be used for ruler objects in NSScrollViews
to aClass. This class is normally NSRulerView, but you can use this
method to set it to a custom subclass of NSRulerView.
how do I solve this?
thanks,
- Koen.
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
DATE : Thu Jan 30 16:36:57 2003
Hi,
I want to customize an NSRuler of a NSScrollView, and from the
documentation I found the method setRulerViewClass. So In MyDocument
I call:
- (void)windowControllerDidLoadNib:(NSWindowController *) aController
{
[super windowControllerDidLoadNib:aController];
NSScrollView *scroller = [myTextView enclosingScrollView];
MyRulerView *ruler;
ruler = [[MyRulerView alloc] init];
[scroller setRulerViewClass: ruler];
[scroller setHasVerticalRuler:YES];
[scroller setRulersVisible:YES];
[ruler release];
}
However, I get an error that scroller doesn't respond to
setRulerViewClass. This is from the docs:
+ (void)setRulerViewClass:(Class)aClass
Sets the default class to be used for ruler objects in NSScrollViews
to aClass. This class is normally NSRulerView, but you can use this
method to set it to a custom subclass of NSRulerView.
how do I solve this?
thanks,
- Koen.
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
| Related mails | Author | Date |
|---|---|---|
| Koen van der Drift | Jan 30, 16:36 | |
| Marco Binder | Jan 30, 17:43 | |
| Koen van der Drift | Jan 30, 19:04 | |
| Koen van der Drift | Jan 30, 19:33 | |
| Michael Latta | Apr 6, 23:18 | |
| Koen van der Drift | Apr 7, 15:46 |






Cocoa mail archive

