• 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: Ensuring no selection in a table view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ensuring no selection in a table view


  • Subject: Re: Ensuring no selection in a table view
  • From: John Brownie <email@hidden>
  • Date: Thu, 30 Dec 2010 11:11:55 +1000

On Thu Dec 30 2010 09:56:18 GMT+1000 (PGT) Kyle Sluder wrote:

Is it propagating the selection from the controller? IOW, just because
you have set avoidsEmptySelection=NO doesn't mean the controller will
*prefer* an empty selection.

I don't understand this. How does the controller propagate a selection? How does it get a selection in the first place? Do I need to use something like setSelectedObjects: for the controller with an empty array? (Tried that, didn't change anything.)


Just to be clear, whenever the window is shown, I set the contents of the array to be correct for the current context. I used deselectAll: in the routine that set the array, but it didn't seem to have any effect.

- (void)setStateStack:(NSArray *)newStack
{
	[newStack retain];
	[stateStack release];
	stateStack = newStack;
	[stateStackTable deselectAll:self];
	NSArray *tempArray = [NSArray array];
	[stateStackController setSelectedObjects:tempArray];
	[tempArray release];
	[stateStackScroll setNeedsDisplay:YES];
}

John
--
John Brownie, email@hidden or email@hidden
Summer Institute of Linguistics      | Mussau-Emira language, Mussau Is.
Ukarumpa, Eastern Highlands Province | New Ireland Province
Papua New Guinea                     | Papua New Guinea
_______________________________________________

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: Ensuring no selection in a table view
      • From: Kyle Sluder <email@hidden>
References: 
 >Ensuring no selection in a table view (From: John Brownie <email@hidden>)
 >Re: Ensuring no selection in a table view (From: Erik Buck <email@hidden>)
 >Re: Ensuring no selection in a table view (From: John Brownie <email@hidden>)
 >Re: Ensuring no selection in a table view (From: Kyle Sluder <email@hidden>)

  • Prev by Date: Re: Ensuring no selection in a table view
  • Next by Date: Re: Ensuring no selection in a table view
  • Previous by thread: Re: Ensuring no selection in a table view
  • Next by thread: Re: Ensuring no selection in a table view
  • Index(es):
    • Date
    • Thread