Re: [NSTableView] Drag and Drop issues with NSButton in Leopard
Re: [NSTableView] Drag and Drop issues with NSButton in Leopard
- Subject: Re: [NSTableView] Drag and Drop issues with NSButton in Leopard
- From: Stéphane Sudre <email@hidden>
- Date: Thu, 4 Sep 2008 00:17:19 +0200
On Sep 3, 2008, at 12:27 AM, Corbin Dunn wrote:
On Sep 2, 2008, at 1:59 PM, Stéphane Sudre wrote:
I have some code that works OK on Tiger but does not on Leopard.
I have a NSTableView with a column whose data cell is a
NSButtonCell subclass.
The NSButtonCell is set to be a checkbox/switchbox.
The subclass implements the following method:
- (BOOL) trackMouse:(NSEvent *)theEvent inRect:(NSRect)cellFrame
ofView:(NSView *)controlView untilMouseUp:(BOOL)flag
{
return YES;
}
in order to prevent clicks to be taken into account.
On Mac OS X 10.4.x, this works perfectly: you can't click the
checkbox to change its value but you can initiate a drag by
clicking on the checkbox.
On Mac OS X 10.5.x, this prevents the click but does not allow the
drag operation to begin.
I've tried to play with the new NSTableViews methods in Leopard to
deal with advanced tracking but this did not help. Either it's a
regression or I'm not doing something correctly (I just hope it's
the second case).
What could be done to make this work on Leopard?
The release notes should have covered this, but you want to
implement this in 10.5 (only required if you are linking against
10.5 or higher):
I'm linking against 10.4 when developing on Tiger and against 10.5
when developing on Leopard. So I'm in the "only" case.
[...]
Return anything except trackable. This fixes it?
It does.
Thanks.
_______________________________________________
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