現在、Xcode でユーザー インターフェイスを作成し、AppleScriptObjC のスクリプトを作成しています。
インターフェイスに 4 つのラジオ ボタンがあります。それらをプログラムするにはどうすればよいですか?これは私の現在のコードです:
-- IBOutlets
property window : missing value
property question1Radio1 : missing value
property question1Radio2 : missing value
property question1Radio3 : missing value
property question1Radio4 : missing value
property enterButton : missing value
on applicationWillFinishLaunching_(aNotification)
-- Insert code here to initialize your application before any files are opened
end applicationWillFinishLaunching_
--Radio button script here
on applicationShouldTerminate_(sender)
-- Insert code here to do any housekeeping before your application quits
return current application's NSTerminateNow
end applicationShouldTerminate_
これは私が試したコードですが、動作しません
-- IBOutlets
property window : missing value
property question1Radio1 : missing value
property question1Radio2 : missing value
property question1Radio3 : missing value
property question1Radio4 : missing value
property enterButton : missing value
on applicationWillFinishLaunching_(aNotification)
-- Insert code here to initialize your application before any files are opened
end applicationWillFinishLaunching_
on buttonClicked_(sender)
if question1Radio1 = false as boolean then display alert "Works"
end buttonClicked_
on applicationShouldTerminate_(sender)
-- Insert code here to do any housekeeping before your application quits
return current application's NSTerminateNow
end applicationShouldTerminate_