• 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
Subclassing NSArrayController?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Subclassing NSArrayController?


  • Subject: Subclassing NSArrayController?
  • From: Chris Poliquin <email@hidden>
  • Date: Tue, 19 Aug 2008 10:27:57 -0400

Hi,

I have an ArrayController in IB to manage an array of NSObjects (a custom class) for a TableView. When a new item is inserted via a button connected to insert: a new instance of my class is created and appears in the table. However, I want to be able to control the property values of the new object at the time it is created.

So, my class has a property called timeString. The timeString is different for each object and is based on the time showing on a stopwatch (NSTextField) when the object is created. Do I need to subclass NSArrayController and override the insert method in order to deal with getting this value and assigning it to the object at creation or would Key Value Observing in my Controller class be more effective? What is the standard way of doing this? Perhaps there is a way to bind the new object's property to the NSTextField value via IB and still make it so it never changes?


Best Regards, Chris Poliquin ----------------------------- email@hidden www.chrispoliquin.com




_______________________________________________

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: Subclassing NSArrayController?
      • From: Justin Giboney <email@hidden>
    • Re: Subclassing NSArrayController?
      • From: Ron Lue-Sang <email@hidden>
  • Prev by Date: Re: Question about respondsToSelector
  • Next by Date: Re: Subclassing NSArrayController?
  • Previous by thread: Re: Window controllers, code obfuscation
  • Next by thread: Re: Subclassing NSArrayController?
  • Index(es):
    • Date
    • Thread