Re: Detecting MouseUp in NSSplitview
Re: Detecting MouseUp in NSSplitview
- Subject: Re: Detecting MouseUp in NSSplitview
- From: Peter Zegelin <email@hidden>
- Date: Thu, 30 Dec 2010 20:54:32 +1100
A bit cryptic but I still can't get it to work.
I implemented:
- (BOOL)acceptsFirstResponder{
return YES;
}
- (void)mouseDown:(NSEvent *)theEvent{
}
- (void)mouseUp:(NSEvent *)theEvent{
}
and my mouseUp *does* get called. However the divider doesn't move. So I added [super mouseDown:theEvent]; to my mouseDown:
- (void)mouseDown:(NSEvent *)theEvent{
// I set something here
[super mouseDown:theEvent];
}
and the divider now works but mouseUp is never called.
So it looks like NSSplitView is sufficiently different ( ie it has to move a divider ) that to get the mouseUp event I would have to handle the divider drag myself, which is probably more complicated than it looks.
Further suggestions welcome!
On 30/12/2010, at 4:38 PM, Kyle Sluder wrote:
> On Wed, Dec 29, 2010 at 9:30 PM, Peter Zegelin
> <email@hidden> wrote:
>> I would like to detect when a user has finished dragging on a splitview divider but unfortunately just adding:
>>
>> - (void)mouseUp:(NSEvent *)theEvent{
>> [super mouseUp:theEvent];
>> }
>>
>> to my NSSplitview subclass doesn't seem to work as it never gets called. I get the mouseDown event but not the mouseUp.
>>
>> Any suggestions as to why my mouseup isn't getting called would be appreciated.
>
> http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/EventOverview/HandlingMouseEvents/HandlingMouseEvents.html#//apple_ref/doc/uid/10000060i-CH6-SW18
>
> --Kyle Sluder
kind regards,
Peter Zegelin
http://www.fracturedsoftware.com
Rondo - MIDI for your mac
MacSimAVR - AVR microcontroller simulator for OS X
_______________________________________________
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