• 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
[NSTableView] option + click change of behavior between Tiger and Leopard
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[NSTableView] option + click change of behavior between Tiger and Leopard


  • Subject: [NSTableView] option + click change of behavior between Tiger and Leopard
  • From: Stephane Sudre <email@hidden>
  • Date: Tue, 20 Nov 2007 16:48:12 +0100

I'm seeing a difference between Leopard and Tiger regarding some code I'm using to handle an option-click in a NSTableView.

Basically, I have a subclass of NSTableView that does this:

- (void) mouseDown:(NSEvent *) inEvent
{
BOOL tOptionClick=NO;

if ([inEvent clickCount]==1 && ([inEvent modifierFlags] & (NSControlKeyMask|NSAlternateKeyMask))==NSAlternateKeyMask)
{
tOptionClick=YES;

inEvent=[NSEvent mouseEventWithType:[inEvent type]
location:[inEvent locationInWindow]
modifierFlags:0
timestamp:[inEvent timestamp]
windowNumber:[inEvent windowNumber]
context:[inEvent context]
eventNumber:[inEvent eventNumber]
clickCount:[inEvent clickCount]
pressure:[inEvent pressure]];


	}

	[super mouseDown:inEvent];

	if (tOptionClick==YES)
	{
		if ([self delegate]!=nil)
		{
			[[self delegate] tableViewDidOptionClick:self];
		}
	}
}

On Tiger, it works as I would like it to work:

When I option-click a row, it selects the row and then call tableViewDidOptionClick. The clicked cell does not enter edit mode.

On Leopard, it does not work as I would like to work:

When I option-click a row, it selects the row and then call tableViewDidOptionClick. BUT the clicked cell enters edit mode.


I could probably workaround this by adding an ivar to the subclass of NSTableView so that - (BOOL)tableView:(NSTableView *)tableView shouldEditTableColumn:(NSTableColumn *)tableColumn row:(int)row returns NO when [super mouseDown:inEvent] is called.




But would there be a better way to proceed?

_______________________________________________

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: [NSTableView] option + click change of behavior between Tiger and Leopard
      • From: Corbin Dunn <email@hidden>
  • Prev by Date: Horizontal-only scrolling
  • Next by Date: Re: Why is Leopard annoying my users?
  • Previous by thread: Re: Horizontal-only scrolling
  • Next by thread: Re: [NSTableView] option + click change of behavior between Tiger and Leopard
  • Index(es):
    • Date
    • Thread