• 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
Re: two table view selection problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: two table view selection problem


  • Subject: Re: two table view selection problem
  • From: Andy Lee <email@hidden>
  • Date: Tue, 4 Mar 2008 11:09:03 -0500

Try changing the -isEqual: calls to == instead, e.g.:

	if ([notification object] == tableView1)

I suspect -isEqual: is always returning YES.

--Andy


On Mar 4, 2008, at 9:35 AM, Nick Rogers wrote:

Hi,
I have two NSTableView in my app (tableView1 and tableView2).
If I select a row in tableView1 and then if I select a row in tableView2, I want the row in tableView1 to be deselected.
For this I'm using [tableView1 deselectAll: nil], but it leads to calling the delegate method again and leads to deselection of the selected row in tableView2 also.
So this way both table view's stands deselected.


Is there a noble way to do it?
Listing:

- (void)tableViewSelectionDidChange:(NSNotification *)notification
{
	if ([[notification object] isEqual: tableView1] == YES)
	{
		[tableView2 deselectAll:nil];
		// add code here
	}

	if ([[notification object] isEqual: tableView2] == YES)
	{
		[tableView1 deselectAll:nil];
		// add code here
	}
}

Wishes,
Nick

_______________________________________________

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

_______________________________________________

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: two table view selection problem
      • From: Corbin Dunn <email@hidden>
References: 
 >two table view selection problem (From: Nick Rogers <email@hidden>)

  • Prev by Date: Tabless NSTabView IB3 Bug
  • Next by Date: Re: Tabless NSTabView IB3 Bug
  • Previous by thread: Re: two table view selection problem
  • Next by thread: Re: two table view selection problem
  • Index(es):
    • Date
    • Thread