Hi all,I have a background application and now want to change cursor image over 
different types of views. I create a NSTrackingArea with option 
(NSTrackingCursorUpdate | NSTrackingActiveAlways) and add the tracking area to 
my customer view. Also, I rewrite the -(void)cursorUpdate:(NSEvent *)event 
method and set the cursor image there. However, when I run this background app, 
I find the cursorUpdate method is called(judging from the log info) but the 
cursor image isn't been updated. Does anyone have experience about it? Did I 
miss anything? Here is my code:#import "ContentView.h"
@implementation ContentView
- (id)initWithFrame:(NSRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
      trackingArea = [[NSTrackingArea alloc] initWithRect:[self bounds]         
                                         options: (NSTrackingCursorUpdate | 
NSTrackingActiveAlways)                                                    
owner:self                                                  userInfo:nil];      
[self addTrackingArea:trackingArea];
    }
    return self;
}
- (void)cursorUpdate:(NSEvent *)event {
  NSLog(@"cursorUpdate");
  [[NSCursor crosshairCursor] set];
}Thanks in advance !
_________________________________________________________________
微软地图率先推出跨城市多点驾车路线查询!
http://ditu.live.com/?form=MRAHAB&rtp=pos.30.454167_116.308611_%E5%A4%AA%E6%B9%96__~pos.29.554046_115.983427_%E5%BA%90%E5%B1%B1__~pos.29.116111_110.478889_%E5%BC%A0%E5%AE%B6%E7%95%8C__&rtop=0~0~0&encType=1
_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to