Understanding [NSTextview setInsertionPointColor:]
Understanding [NSTextview setInsertionPointColor:]
- Subject: Understanding [NSTextview setInsertionPointColor:]
- From: Jens Bjerrehuus <email@hidden>
- Date: Tue, 8 Nov 2005 21:28:01 +0100
Hello
I'm trying to clear up whether I'm misunderstanding the meaning of
the setInsertionPointColor: method on NSTextview or if there is an
error in it's behavior.
I've boiled my testcase down to just this method:
- (IBAction)changeColor:(id)sender
{
[textView setInsertionPointColor:[sender color]];
}
on this NSDocument subclass:
@interface MyDocument : NSDocument
{
IBOutlet NSTextView *textView;
IBOutlet NSColorWell *colorWell;
}
- (IBAction)changeColor:(id)sender;
@end
The action method is connected to the NSColorWell.
When I select the color well the insertion point changes color to the
selected color. But the text I enter after this also changes
foreground color. Also, if I select the color well with an active
selection of some text in the text view the foreground color of the
selected text changes immediately to the insertion point color.
Is this as it should be and I just don't understand the
setInsertionPointColor: method or is this an error?
I only expected the insertion point (the I beam) to change color in
either of these cases.
Best regards
Jens
_______________________________________________
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