PopUp button + Controller Layer
PopUp button + Controller Layer
- Subject: PopUp button + Controller Layer
- From: Raphael Sebbe <email@hidden>
- Date: Wed, 12 Nov 2003 18:30:42 +0100
Hi there,
Working with NSController...
here is my data structure:
MALayer
.name (NSString)
.height (float)
MACurve
.layer (MALayer, not retained)
MADocument
.selectedCurve (MACurve)
.layers (NSMutableArray of MALayer)
Buimding the inspector, I want a popup that 1. shows all layers name
(document.layers) and that 2. selects the one from the selectedCurve.
For this, I create an NSObjectController for the selected curve and an
NSArrayController for the layers from Interface Builder. They are
respectively bound to App.mainWindow.document.selectedCurve and
App.mainWindow.document.layers .
1. works perfectly, by binding popup's contentValues to
arrayController.arrangedObjects.name . 2. seems to work too by binding
popup's selectedValue to objectController.layer, but when I put an
NSLog inside MACurve's setLayer:layer, I see that the passed "layer" is
actually a string (layer.name), not the layer itself...
What is the problem ? Do I need to use value transformers ?
Help greatly appreciated. Thanks,
Raphael Sebbe
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.