Setting enabled for button within several objects

Hi I am attempting to change the “enabled” value of a button which is buried within a few other controls. Here’s the line:


set enabled of button "btnName" of box "boxName" of tab view item "TabName" of tab view "TabViewName" of window "main" to false

For some reason this is attempting to set the enabled value for the <>, not the button class at runtime??

Any Ideas?

Thanks,

Well, your code is sound. I do not see any errors, it looks identical to the code I use in my apps.

Maybe the names you gave the buttons or tab view didn’t stick in IB?

Maybe the hierarchy to get to the button is incorrect… did you check in IB what the order is in the MainMenu.xib (or whatever the nib is named)? You will see the correct hierarchy to your button, very usefull to troubleshoot hierarchies mistakes i find…

Let me know if that helped, otherwise we’ll have to dig deeper!

Good night.

Model: MacBookPro2,2
Browser: Safari 531.9
Operating System: Mac OS X (10.6)