Re: Bindings Driving Me CRAZY. :'(
Re: Bindings Driving Me CRAZY. :'(
- Subject: Re: Bindings Driving Me CRAZY. :'(
- From: Gustavo Pizano <email@hidden>
- Date: Mon, 12 Oct 2009 21:33:27 +0200
Keary Hello:
This doesn't appear sensible, and you may have a number of problems.
First, make sure that InvoiceEditionViewController is being
instantiated
this is what Im doing: in the awakeFromNib
if(_userListController == nil){
_userListController = [[UserListViewController alloc]
initWithNibName:@"UserListView" bundle:nil];
}
if(_invoiceController == nil){
_invoiceController = [[InvoiceEditionViewController alloc]
initWithNibName:@"InvoiceEditionView" bundle:nil];
}
[_myUserListView addSubview:[_userListController view]];
[_myContentView addSubview:[_invoiceController view]];
[_invoiceController setUserController:_userListController];
properly. Second, simply have a reference to UserListViewController
in InvoiceEditionViewController, which can be an outlet if
ok done I have now there this : IBOutlet UserListViewController *
userController;
InvoiceEditionViewController can be sensibly instantiated via xib,
or set by other means. I recommend then to have an
NSObjectController in InvoiceEditionViewController.xib whose content
is bound to UserListViewController.NSArrayController.selection
(using correct ivar/property names, of course).
Ok I tried but when wan tto bind the labels to show the details I bind
it to the NSObjectControlled I just configured, and the controller key
goes to selection, which its not good, so whe I run I see its NO
Selection. label.
I did instead was to place an NSArrayController (users) in IB and bind
the contents to
userController._userListArrayController.arrangedObjects.
then the labels I bind the values to users, and the controller key to
selection and the path to the attributes of the entity.
And it works 50%, I can see the values., but when I select another
user, the values dosn't change, it's seems its getting only the 1st
value of the array.
: (
Tanks tough .. any other ideas I will very welcome them.
Gustavo
HTH,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
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