• 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: NSTableView doesn't show data until I click on a header
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView doesn't show data until I click on a header


  • Subject: Re: NSTableView doesn't show data until I click on a header
  • From: Koen van der Drift <email@hidden>
  • Date: Mon, 30 Apr 2012 07:53:50 -0400

Thanks for the link. I am confused now, since it says:

"Indexed Accessor Pattern
[...]
There are indexed accessors which return data from the collection (the
getter variation) and mutable accessors
that provide an interface for mutableArrayValueForKey: to modify the
collection."

Which (I think) is what I am doing now. But it's too early and I
haven't drank all my coffee yet :)

- Koen.




On Sun, Apr 29, 2012 at 10:56 PM, mmalc Crawford <email@hidden> wrote:
>
> On Apr 29, 2012, at 9:22 AM, Koen van der Drift <email@hidden>
> wrote:
>
> So for future reference, my data model is an NSMutableArray.  Instead of
> adding objects by calling addObject, I need to call it as follows:
>
> - (void)addMyObject:(MyObject *)obj
> {
>    NSMutableArray *temp = [self mutableArrayValueForKey: @"myArray"];
>    [temp addObject: obj];
> }
>
> Is there any reason not to implement the appropriate KVC accessor methods
> for myArray?
>
> <https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/KeyValueCoding/Articles/AccessorConventions.html#//apple_ref/doc/uid/20002174-BAJEAIEE>
>
> (See also
> <https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/KeyValueObserving/Articles/KVOCompliance.html#//apple_ref/doc/uid/20002178-BAJEAIEE>.)
>
> mmalc
>

_______________________________________________

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: NSTableView doesn't show data until I click on a header
      • From: Quincey Morris <email@hidden>
References: 
 >NSTableView doesn't show data until I click on a header (From: Koen van der Drift <email@hidden>)
 >Re: NSTableView doesn't show data until I click on a header (From: Keary Suska <email@hidden>)
 >Re: NSTableView doesn't show data until I click on a header (From: Koen van der Drift <email@hidden>)
 >Re: NSTableView doesn't show data until I click on a header (From: mmalc Crawford <email@hidden>)

  • Prev by Date: Re: NSTableView doesn't show data until I click on a header
  • Next by Date: Re: NSTableView doesn't show data until I click on a header
  • Previous by thread: Re: NSTableView doesn't show data until I click on a header
  • Next by thread: Re: NSTableView doesn't show data until I click on a header
  • Index(es):
    • Date
    • Thread