• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Understanding [NSTextview setInsertionPointColor:]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Understanding [NSTextview setInsertionPointColor:]
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Re: Casting anonymous Objects leads to different values on getter functions (while getting no warnings at compile time)
  • Next by Date: Re: Understanding [NSTextview setInsertionPointColor:]
  • Previous by thread: Re: Using NSSocketPort, NSConnection, Distributed Objects, and threads...
  • Next by thread: Re: Understanding [NSTextview setInsertionPointColor:]
  • Index(es):
    • Date
    • Thread