Hey there Cocoa gurus. I've recently started picking up Obj-C/Cocoa after telling myself I'd get around to it for a few years, and I'm running into some weirdness with bindings.
I've gone through the great tutorial on bindings at cocoadevcentral and I got it to work perfectly, just as expected. However, when I try to apply the same principles to my own in-progress app the results are less than satisfactory.
Ok...here's the situation as best I can explain it...
I have an NSPopUpButton bound to an NSArrayController ("ConvertTypes") which controls an array of a self-defined class called "Type." This part works fine, although there is no updating of values involved with this pop-up.
I then have two more NSPopUpButtons, each bound to an NSArrayController ("ConvertUnits1" and "ConvertUnits2"), which are each in turn bound to the selection of original ConvertTypes controller and control an array that is property of that Type class. (Hope this isn't too confusing yet...) The problem is this - if I change the selected value on the first pop-up menu, the 2nd and 3rd menus should update with the new values (they're units) specific to the selected value (a unit type) in the first pop-up. But they don't.
If anyone could take a look, I'd be greatly appreciative...cause I'm stumped.
http://dl.getdropbox.com/u/417/Converter.zip
I've gone through the great tutorial on bindings at cocoadevcentral and I got it to work perfectly, just as expected. However, when I try to apply the same principles to my own in-progress app the results are less than satisfactory.
Ok...here's the situation as best I can explain it...
I have an NSPopUpButton bound to an NSArrayController ("ConvertTypes") which controls an array of a self-defined class called "Type." This part works fine, although there is no updating of values involved with this pop-up.
I then have two more NSPopUpButtons, each bound to an NSArrayController ("ConvertUnits1" and "ConvertUnits2"), which are each in turn bound to the selection of original ConvertTypes controller and control an array that is property of that Type class. (Hope this isn't too confusing yet...) The problem is this - if I change the selected value on the first pop-up menu, the 2nd and 3rd menus should update with the new values (they're units) specific to the selected value (a unit type) in the first pop-up. But they don't.
If anyone could take a look, I'd be greatly appreciative...cause I'm stumped.
http://dl.getdropbox.com/u/417/Converter.zip