On Jul 12, 2008, at 3:29 PM, Ashley Perrien wrote:

Click the add button to add a line, click through the table and fill in the fields to get the data in.

Instead what I want is to have several textfields in the view, fill those out, click add, it performs all the necessary operations with it, adds it to the array and it shows up in the table.

Instead of connecting your add button to the array controller's - add: action, how about creating an -addFromFields: action in some other controller. This will create a new instance of your model object, set its attributes to the contents of the text fields (to which you have outlets connected so you can communicate with them), then call the array controller's -addObject: method, passing in the newly-created model object.

--
I.S.

_______________________________________________

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