Subclass and override newObject which is declared in NSObjectController.h

You can set any properties you like from there.

---------------------
RONZILLA

On Aug 19, 2008, at 7:27 AM, Chris Poliquin <[EMAIL PROTECTED]> wrote:

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 PROTECTED]
www.chrispoliquin.com




_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/luesang%40apple.com

This email sent to [EMAIL PROTECTED]
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to