Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Good Grief! Nscombobox problem :-)



Well, after working hard on my app and figuring out how to load multiple
elements for different OS X versions, I've come across a sticking point that
I'm sure is easy to figure out, but for the life of me I can't. I've gotten
past the effective UID issue, the sudo with administrative privileges issue,
now I really need a clear answer to this question, so if anyone can help,
thanks!

Here goes:

I have a NIB with a tab view and two of the tab views have NsComboBox
elements with pre-defined lists of actions that kick off a shell script.
The user selects the action, clicks the "go" button, and all moves forward
as expected with this code:

else if contents of combo box "cleanlist" of tab view item "cleanup" of tab
view "tabs" of window "Mocktail" is equal to "Clean Caches" then
                tell the window of theObject
                    tell progress indicator "spin"
                        set uses threaded animation to true
                        start
                    end tell
                    set contents of text field "status" to "Cleaning Caches"
                end tell
                
                delay 1
                
                set cacheout to "rm -rfv  /Library/Caches/com*;rm -rfv
/System/Library/Caches/com*;rm -rfv /System/Library/Caches/font*"
do shell script "sh -c " & quoted form of cacheout user name adminName
password adminPass with administrator privileges


The problem is that when I try the same with another NsComboList that lives
in a different NsTabViewItem, then it doesn't work at all. Whichever
NsComboList is call fist is the one that works. The one following goes
"deaf." Both are being called from within the OnClicked theObject.

Any ideas how to make both NsComboLists work? TIA!


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.