Adding binding causes all bindings to fail
Adding binding causes all bindings to fail
- Subject: Adding binding causes all bindings to fail
- From: Steve Checkoway <email@hidden>
- Date: Tue, 9 Oct 2007 03:20:15 -0700
I have a strange situation where when I add one additional binding in
Interface builder, all of them seem to stop working.
My set up:
I have an Array Controller which is bound to an NSMutable array in my
application's main class. Very similar to the documentation for Cocoa
bindings, I have a Master-Detail interface. The master is an
NSTableView with two columns, each of the columns is bound to a
different key in the array controller. The first has the model key
path of Array Controller.arrangedObjects.foo and the second has path
Array Controller.arrangedObjects.bar. When I add items to my array
controller programatically, the appropriate values show up in the table.
My detail view consists of 7 parts. I have two text fields, two
images, and two text views. One of each of the pairs correspond to one
column in the table, the other three correspond to the other column.
There is one additional text field. The two groups of three are
identical except for the Model Key path in the binding. One set
consisting of a text field, image, and text view have the model key
path corresponding to Array Controller.selection.foo while the other
three correspond to Array Controller.selection.bar. The three views
(text field, image, and text view) display different things based on a
custom value formatter. The additional text field binds to Array
Controller.selection.size.
The problem:
If I have 6 of these connected, say the three binding to foo, the text
field binding to size, and the text view and text field binding to
bar, then when I add items to my array controller, everything works
exactly as I would expect: the data shows up in the table, clicking on
the item shows more information in my detail view.
When I hook up the last view binding to bar, recompile, start the app,
and add something to the array controller, nothing happens. There is
no console message, no exceptions are thrown, nothing appears in the
table, no selection is made (or maybe it is and the detail view just
stops working), nothing. If I uncheck the bind button in IB, it goes
back to working (except for the one unbound view).
As far as I can tell, it doesn't matter which subset of these 7 I use,
as long as I don't use them all, it works.
I'm at a loss. I've been playing with this for several hours. I only
have 10 bindings in total right now, I'm positive that there cannot be
a limit of 9 bindings per application. Any suggestions would be much
appreciated.
--
Steve Checkoway
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
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