• 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: ArrayController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >ArrayController (From: Ashley Perrien <email@hidden>)

  • Prev by Date: Updating print panel preview
  • Next by Date: Re: triangulating webcams
  • Previous by thread: ArrayController
  • Next by thread: Re: ArrayController
  • Index(es):
    • Date
    • Thread