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

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


References: 
 >Bindings problem... (From: Eli Dylan Lorimer <email@hidden>)
 >Re: Bindings problem... (From: Steven Kramer <email@hidden>)
 >Re: Bindings problem... (From: mmalcolm crawford <email@hidden>)

  • Prev by Date: NSSearchField...Solution
  • Next by Date: Re: Weird behavior in NSMutableDictionary
  • Previous by thread: Re: Bindings problem...
  • Next by thread: Removing a subclass...
  • Index(es):
    • Date
    • Thread