Hello again.

Im overriding this method :

-(void) updateTrackingAreas{
        [super updateTrackingAreas];
        NSInteger i = 0;
        while ([[self trackingAreas] count]==0) {
                [self removeTrackingArea:[[self trackingAreas] 
objectAtIndex:i]];
                i++;
        }
        
        NSTrackingArea * leftBotom = [[NSTrackingArea alloc] 
initWithRect:NSMakeRect(_leftColumn.origin.x, _leftColumn.size.height-2.0f, 
_leftColumn.size.width, 2.0f)
                                                                                
                                          
options:NSTrackingMouseEnteredAndExited|NSTrackingCursorUpdate|NSTrackingActiveInActiveApp
                                                                                
                                                owner:self userInfo:nil];
        [self addTrackingArea:leftBotom];
        NSTrackingArea * rightBotom = [[NSTrackingArea alloc] 
initWithRect:NSMakeRect(_rightColumn.origin.x, _rightColumn.size.height-2.0f, 
_rightColumn.size.width, 2.0f)
                                                                                
                                           
options:NSTrackingMouseEnteredAndExited|NSTrackingCursorUpdate|NSTrackingActiveInActiveApp
 
                                                                                
                                                 owner:self userInfo:nil];
        
        [self addTrackingArea:rightBotom];
        [leftBotom release];
        [rightBotom release];
}

and now the tracking areas are being properly updated in the new position. BUT 
its keeping still track of old tracking areas.. I mean.. when I move the mouse 
over the position where the old tracking area was suppoeusd to be.. my cursor 
changes, and I get a log "tracking entered" which I put in the mouseEntered 
method.

what am I missing to get rid of old values, trackingareas?

Gustavo

On Dec 28, 2009, at 4:12 PM, Gustavo Pizano wrote:

> Hello all.
> 
> I have this simple thing to do, but I can't find how to.
> Im declaring tracking  areas for my view to be the a small portion of the 
> bottom part of it, this is to allow resizing of the view, and be able to 
> updateCursor when the mouse is over it.. now.. when I set the view for first 
> time, all its ok, the tracking area its where its supposed to be, I can 
> resize. Then if I want to resize again  the cursor doesn't change, and of 
> course because of the logic I have I can't resize, the tracking area stays at 
> the position specified when created, btu after resizing I hadn't been able to 
> change its positions to the new one.
> 
> any ideas?
> 
> thanks
> 
> Gustavo
> 

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to