• 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
NSTextView trackingArea problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTextView trackingArea problem


  • Subject: NSTextView trackingArea problem
  • From: Xu ZiZhan <email@hidden>
  • Date: Thu, 26 Feb 2009 18:34:02 +0800

Good day:

I have a class which is subclass of NSTextView, and I use a

- (void)updateTrackingAreas{

                     NSTrackingArea *trackingArea =   [[NSTrackingArea
alloc] initWithRect:usedRect

        options:NSTrackingMouseEnteredAndExited|

                NSTrackingActiveInActiveApp|

                NSTrackingMouseMoved|

                NSTrackingAssumeInside

          owner:self

       userInfo:userinfo];


                     [self addTrackingArea:trackingArea];
}
to  add the tracking areas with "usedRect" which I want to track

but when the app running, I found that as long as I move the cursor into the
textView ,that means the rect of [self bounds],it will triger the
-(void)mouseEntered immediatly.
so the problem is the textview has a tracking area of [self bounds],but not
my "usedRect".
dose the NSTextView has a trackingArea of [self bounds]? and how I can add
my custom trackingarea?

Thanks & Regards,

Stan
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSTextView trackingArea problem
      • From: Douglas Davidson <email@hidden>
  • Prev by Date: Strange NSString Behavior
  • Next by Date: Getting an object across application
  • Previous by thread: Re: Strange NSString Behavior
  • Next by thread: Re: NSTextView trackingArea problem
  • Index(es):
    • Date
    • Thread