Can I Get a Word In wrote:
> I have an NSTableView bound to an NSArrayController. The
> NSArrayController is populated with NSDictionarys, each of which
> constitutes a row in the NSTableView. I also have two NSTextfields that
> are bound to the selection of the NSTableView. When a selection is made
> in the NSTableView, the NSTextfields are populated. This all works just
> fine, except, when the NSTableView is first populated. The first item in
> the NSTableView is automatically selected, but the text fields are not
> populated. This is actually OK for me. I want the user to make a
> selection, and then I want to the text fields to populate. But, if I now
> click on the first row in the table, my text fields do not populate. I
> have to first click another row and then back onto the first row to see
> that selection populate the text fields. I would guess that until
> another row is clicked, no selectiondidchange message is sent, so the
> text fields don't populate. There are delegate methods that would help
> with this, but if I implement them for this, then I implement them for
> all of the rows, which makes the binding superfluous. So I figure I must
> be missing some checkbox or something in the binding. Can someone hel me
> with this?
> Thanks in advance.
It was a simple fix. I just checked the "Empty" checkbox in IB and now
it works as expected. Don't know how I missed this.


|