• 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: Bindings: changing model changes some views but not others (NSTableColumn)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bindings: changing model changes some views but not others (NSTableColumn)


  • Subject: Re: Bindings: changing model changes some views but not others (NSTableColumn)
  • From: "Sean McBride" <email@hidden>
  • Date: Fri, 1 Dec 2006 14:01:01 -0500
  • Organization: Rogue Research

On 2006-11-30 17:16, Scott Stevenson said:

>> And now I have the same problem as my app!  That is, if I change a
>> model
>> object, the tableview does not update unless I resize the window or
>> click the tableview.  It's as if tableview has simply forgot to
>> redraw.
>> Text fields update fine, but not table columns.
>>
>> Shouldn't what I did work?
>
>It's hard to say because we're only seeing little snippets of the
>project and there are a lot of subtleties to the equation.

True enough!  If you or anyone else would like to take 2 minutes to
check it out, I've distilled it down to something very simple (I know
your time is precious).  No code changes are needed, you just use one of
two versions of the NIB.  One NIB uses an NSArrayController in the NIB,
the other uses an NSArrayControllor created programatically and accessed
via File's Owner.  This screenshot shows the differences in bindings:
<http://www.rogue-research.com/vtk/BindingComparisions.png>

The zipped up project is here:
<http://www.rogue-research.com/vtk/NSTableColumnNotUpdating.zip>

>Is there some reason you need to create the NSArrayController
>programmatically? The setup you have with a table column binding down
>through MyDocument to reach an NSArrayController is a bit
>unconventional. Why not just add it in IB?

Alas one reason is that the code is used by an old PowerPlant
application, and doesn't have any NIBs at all. :)  I suppose I could add
a NIB, but what's so magical about NIBs that array controllers have to
exist there?

Thanks,

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: Bindings: changing model changes some views but not others (NSTableColumn)
      • From: Scott Stevenson <email@hidden>
  • Prev by Date: Re: Bindings between nib files (again)
  • Next by Date: observeValueForKeyPath triggered twice when changing column in NSTableView using binding
  • Previous by thread: Re: Bindings between nib files (again)
  • Next by thread: Re: Bindings: changing model changes some views but not others (NSTableColumn)
  • Index(es):
    • Date
    • Thread