Re: ArrayController
Re: ArrayController
- Subject: Re: ArrayController
- From: "I. Savant" <email@hidden>
- Date: Sat, 12 Jul 2008 15:56:39 -0400
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 (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