Bindings Driving Me CRAZY. :'(
Bindings Driving Me CRAZY. :'(
- Subject: Bindings Driving Me CRAZY. :'(
- From: Gustavo Pizano <email@hidden>
- Date: Mon, 12 Oct 2009 19:52:27 +0200
Ok this is what I have:
1. InvoiceGenViewController.m -> Controller for the InvoiceGenView.xib
2. UserListViewController.m -> Controller for the UserListView.xib
3. InvoiceEditionViewController.m -> Controller for the
InvoiceEditionView.xib
InvoiceGenView.xib, has a slipt view and InvoiceGenViewController has
2 IBOutlets NSView one for the each view of the split view and also
has an instance of UserListViewController and
InvoiceEditionViewController, so when loading the nib, I create those
controllers with their respective nib files. So far so good.
The UserListView has an IBOutlet NSArrayController with a connection
in IB to a NSArrayController instance called "Users Array". In IB for
the UserListView.xib, I bind the NSManagedObjectContext to the
Files's Owners managedObjectContext, which Im getting form the
ApplicationDelegate. And I placed a NSTableView with the column
binding to "Users Array" ; controller key :: arrangedObject ; Model
Key Path: completeName.
So when the whole window with all this views loads I can see in
the ;left side a list of Users, displaying the concatenated name.
Anyway, its working till this point. The problem is that when I select
an item form the NSTableView(which is in the UserListView), I want to
display its details in the other view which is controlled by
InvoiceEditionViewController and it's in another .xib. NO SUCCESS! :(
I have tried passing the instance of the NSArrayController from
UserListViewController to InvoiceEditionViewController (IBOutlet also)
and connecting it to an Instance of NSArrayController in the
InvoiceEditionViewController.xib (called "Ref Users List"). Then
setting the fields bindings to:
Bind : "Ref Users List"
Controller key : selection
Model Key Path: firstName .... etc for the rest of fields.
How to solve this situation.
I have checked some examples, but somehow they are confusing me more
than helping me.. :( :( .
thanks in advance, I'll really appreciate any help.
Gustavo Pizano
_______________________________________________
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