PDA

View Full Version : Interface Builder Tab View Variables


kainewynd2
03-28-2006, 09:04 AM
Hello there,

I'm rebuilding an application I made awhile back called Mail Network Backup that was, I admit, quite sub-par. I'm adding a restore tab to the project and I figured the best way to give this funtionality would be to add a tab view option to the GUI. However, when I added this tab view none of my variables are set any longer and I get the generic "something's broken" error message when attempting to run the program. I've slapped the code in a try statement and figured out specifically that it is when the checkbox variables inside one of the tabs is getting called that it errors out. Here is what I need to get to work and I can get the rest to work:

on clicked theObject
try
if name of theObject is equal to "Backup" then

set entbutton to (the state of button "entbutton" of tab view item "BackupWindow" of window "Mail Backup") as boolean
tell me
display dialog "Got here"
end tell
end if
end try
end clicked

To get a visual of the GUI, here (http://mac.alfred.edu/images/screenshot.tiff) is a link to the screenshot. Right now I am just attempting to get the one variable recognized. I also realize that this is just a matter of syntax, but I'm not exactly sure what I should be searching for.

Thanks in advance.

guardian34
03-28-2006, 09:55 AM
I believe the reference to the button isn't right; you're missing the tab view that contains the tab view items.
button "entbutton" of tab view item "BackupWindow" of tab view "whatever" of window "Mail Backup"

kainewynd2
03-29-2006, 09:09 AM
tab view item "BackupWindow" of tab view "whatever" of window "Mail Backup"

Beautiful! I was missing the main tab view file that actually enclosed the tab view options. Thanks a lot!