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

Ensuring no selection in a table view


  • Subject: Ensuring no selection in a table view
  • From: John Brownie <email@hidden>
  • Date: Wed, 29 Dec 2010 16:05:40 +1000

I'm new to Cocoa, coming from Carbon programming (and, before that, Unix).

I am creating a utility-type window which shows information about the current document, and one of the pieces is a table view listing one or more items. The user can't do anything with this information apart from look at it, so I want it to have no selection, but be able to scroll up and down so that all the rows can be seen. The problem is that it always shows the first row selected.

In IB, I have:
For the Scroll View: no focus ring
For the Table View: no column sizing, reordering or headers, only Empty checked in the selection part, State is not enabled, not continuous, and refuses first responder
For the Table Column: not resizable, editable, or hidden
For the Text Field Cell: everything off except Refuses First Responder


In the code, I ensure that the array controller does not avoid empty selection, and that the table view allows an empty selection. I also call deselectAll: when I load the array.

The list appears, I can deselect the row manually (by clicking in an empty row or command-clicking the selected row), but always selects the first row when the window appears.

What am I doing wrong or not doing? Is there something about the window appearing that I need to override?

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: Erik Buck <email@hidden>
  • Prev by Date: Re: XML to Plist
  • Next by Date: Re: Multiple File Open Strategy
  • Previous by thread: Re: Multiple File Open Strategy
  • Next by thread: Re: Ensuring no selection in a table view
  • Index(es):
    • Date
    • Thread