Re: Bindings problem...
Re: Bindings problem...
- Subject: Re: Bindings problem...
- From: Steven Kramer <email@hidden>
- Date: Sat, 18 Dec 2004 12:26:07 +0100
Op 18-dec-04 om 10:49 heeft mmalcolm crawford het volgende geschreven:
On Dec 18, 2004, at 1:32 AM, Steven Kramer wrote:
You probably need only one controller. Bind everything else using
keypaths. So assuming File's Owner is the document, and the document
has a member or getter NSArray* points
you should bind the tablecolumns to
[File's Owner].arrangedObjects.x
This is wrong.
You should typically bind table columns to:
[An Array Controller].arrangedObjects.attributeName
The array controller content is usually set to the array in File's
Owner -- in this example it would be [File's Owner].points.
Yes, of course. Sorry for the absence of mind. Another thing I forgot
to say is that you need to be careful about binding to File's Owner. It
can lead to memory leaks (or rather cyclic references), see
http://theobroma.treehouseideas.com/document.page/18
for the problem and a solution.
There are other solutions, but for now I think you'd be happy just to
get the app up&running, leaking or not.
Regards,
Steven Kramer
--
email@hidden
http://sprintteam.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden