Hi
Im trying to create an App that will use Radio Buttons. Initialy I would like to have 2 Radio buttons, 1 for Hardware and the second for Software. Depending on which is selected I would like it to pull information form respective text files and dispaly them in a pop down. I have been racking my brains and have not been able to find a solution. Is there a posible solution. The code i have is as follows
on awake from nib theObject
end awake from nib
on action theObject
if current row of matrix "CallSubject1" of window "Window" is 1 then
set dialogType to "Hardware"
else if current row of matrix "CallSubject1" of window "Window" is 2 then
set dialogType to "Software"
end if
if (name of theObject is "CallSubject1") then
if dialogType is equal to "Hardware" then
set AppleScript's text item delimiters to return
set theList1 to do shell script "cat /Textfilelocation1.txt | sort -f"
set pickList1 to text items of theList1
delete every menu item of menu of popup button "CallSubject2" of window "Window"
repeat with i in pickList1
make new menu item at the end of every menu item of menu of popup button "CallSubject2" of window "Window" with properties {title:i, enabled:true}
end repeat
set title of popup button "CallSubject2" of window "Window" to "*Choose a Fault*"
else if dialogType is equal to "Software" then
set AppleScript's text item delimiters to return
set theList2 to do shell script "cat /Textfilelocation1.txt | sort -f"
set pickList2 to text items of theList2
delete every menu item of menu of popup button "CallSubject2" of window "Window"
repeat with i in pickList2
make new menu item at the end of every menu item of menu of popup button "CallSubject2" of window "Window" with properties {title:i, enabled:true}
end repeat
set title of popup button "CallSubject2" of window "Window" to "*Choose a Fault*"
end if
end if
end action
any help would be great
Thanks in advance