Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Sbrocket

macrumors 65816
Original poster
Jun 3, 2007
1,250
0
/dev/null
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. :mad:

If anyone could take a look, I'd be greatly appreciative...cause I'm stumped.
http://dl.getdropbox.com/u/417/Converter.zip
 

Sbrocket

macrumors 65816
Original poster
Jun 3, 2007
1,250
0
/dev/null
Yeah, I just noticed the selection that wasn't changing. I'll take a look, thanks.

Edit:
Aha, thats the ticket. Thanks for the reply.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.