Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > [studio] NSTabViewItem

[studio] NSTabViewItem
Thread Tools
Junior Member
Join Date: Jun 2001
Location: Antioch
Status: Offline
Reply With Quote
Apr 4, 2002, 02:28 PM
 
I posted this over at Apple's AppleCare AppleScript forum, but over there- I see a zillion questions and maybe 5 answers, so it looks like that forum is mostly visited by people with questions.

So I thought I'd ask here as well-

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

I'm writing a script using tabs.

I am unable to get the script, however, to change the attributes of a button.

I can get it to work perfectly on a blank window without using tabs, so the issue is the tabs.

Here is my code-

-=-=-=-=-=-=-=-=-=-=-
on resetButtons()
set home_path to path to "cusr" from user domain
set running to 1

tell application "Finder"
if (file "stopfold" of folder home_path) exists then
set running to 0
end if

end tell

if (running = 0) then
display dialog "DEBUG- running = 0"
set the enabled of button "Start Folding" of view "Folding Control Center" of window "Folding Control" to true
set the enabled of button "Stop Folding" of view "Folding Control Center" of window "Folding Control" to false

else
display dialog "DEBUG- running = 1"
set the enabled of button "Start Folding" of view "Folding Control Center" of window "Folding Control" to false
set the enabled of button "Stop Folding" of view "Folding Control Center" of window "Folding Control" to true


end if

end resetButtons
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

of view "Folding Control Center"

That I assume is my problem.
I think view is incorrect.

I've tried everything I can think of.
Unfortunately, Interface Builder doesn't tell you what it should be referred to, I tried TabViewItem since NSButton items are referred to as button- but that gave me no dice.

I have to use tabs.
I just can't figure out what the ************ applescript wants me to call them in order for me to be able to change the attributes of buttons etc. sitting on a tab!
Don't take candy from strangers
     
Junior Member
Join Date: Jun 2001
Location: Antioch
Status: Offline
Reply With Quote
Apr 5, 2002, 02:27 AM
 
Nailed it!

set the enabled of button "Start Folding" of view of tab view item "Folding Control Center" of tab view "Folding Tab" of window "Folding Control" to true

nibs over at http://www.arstechnica.com/ (an OS X/Next Genius that Apple should beg to work for them imho) set me on the right track.
Don't take candy from strangers
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:33 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2