• 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: NSArrayController, TableView and not showing data
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSArrayController, TableView and not showing data


  • Subject: Re: NSArrayController, TableView and not showing data
  • From: Trygve Inda <email@hidden>
  • Date: Thu, 06 Jul 2006 00:48:26 +0000
  • Thread-topic: NSArrayController, TableView and not showing data

> On Wed, 05 Jul 2006 22:39:46 +0000, Trygve Inda <email@hidden>
> said:
>> In my AppController I have:
>>
>> NSMutableArray*  pluginInstances;
>>
>> This is alloc'ed and loaded with data on launch and contains 1 item.
>>
>> I have an NSArrayController in my nib set up as:
>>
>> ObjectClassName:  NSObject  (several kinds of classes might be in the array)
>>
>> Binding (contentArray) points to pluginInstances in my AppController
>>
>> I also have a TableView in a sheet window. The identifier for the column is
>> pluginName (which is an instance variable in my pluginObject
>>
>> I have bound the TableView column to arrangedObjects with a model key path
>> pluginName.
>>
>> So... When I first bring up the tableView, there is nothing in it (although
>> the array has one item). If I click on the column header, the item appears.
>>
>> How can I get it to automatically appear the first time?
>
> You're not giving enough information for anyone to do more than guess, but
> my guess is that the problem is "alloc'ed and loaded with data". You must do
> this in an observable way (e.g. setValue:forKey:) or the NSArrayController
> won't realize that anything has happened. m.

I did get it to work by setting the content of the ArrayController
explicitly, but how could I use setValue:forKey: in this case?

The array is an NSMutableArray of instances MyObjects. MyObjects has an
instance variable called pluginName. The array is built with addObject for
each instance of MyObject.

Thanks for the assistance - pretty new at this.

Trygve


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSArrayController, TableView and not showing data
      • From: Matt Neuburg <email@hidden>
References: 
 >Re: NSArrayController, TableView and not showing data (From: Matt Neuburg <email@hidden>)

  • Prev by Date: Re: NSArrayController, TableView and not showing data
  • Next by Date: Debugging Cocoa at Cocoaheads Lake Forest CA on 7/11
  • Previous by thread: Re: NSArrayController, TableView and not showing data
  • Next by thread: Re: NSArrayController, TableView and not showing data
  • Index(es):
    • Date
    • Thread