ArrayController
ArrayController
- Subject: ArrayController
- From: Ashley Perrien <email@hidden>
- Date: Sat, 12 Jul 2008 14:29:23 -0500
I'm having another go at trying to figure out array controllers and
having problems. I can create a model and a view and use an
ArrayController to tie the two together without much problem. But In
that case, all the editing is done in the table. 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. The user will
never be mucking with the table directly. I've tried setting it up
with and without the ArrayController and only sometimes can I get some
of the data to show up in the table by clicking the column headers.
Sometimes it works, sometimes not, sometimes only some of the data
shows up. I'm assuming the problem is that when I click the add button
which calls a method in MyDocument it ultimately does a [array
addObject: newobject] and the arraycontroller is not being notified
that the array is being updated so it's not redrawing the table. Any
tips on how to get this working? Do I even need the ArrayController?
My grasp of NSArrayController is extremely tenious at best and I've
read over the docs I can find a good number of times.
I can get this working correctly if I manage all the table drawing
myself just fine but then of course I've got more coding to do.
Ashley Perrien
_______________________________________________
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