当前位置: 动力学知识库 > 问答 > 编程问答 >

xcode - AppleScript Slider "start" Value

问题描述:

I want to set a slider with a click to a value via variable, i got that that far:

script AppDelegate

property parent : class "NSObject"

on sliderButton_(sender)

set slider to 100

end sliderButton_

end script

My Button is in the .xib file linked to "sliderButton" and the slider is linked to slider, but if i click on the button nothing happens.

网友答案:

Be more specific when you say you are linking the slider. Are you trying to use a Reference Outlet or a Binding to the slider's value? Cause you're showing neither in your code.

You'd need:

property mySlider: "100"

and then bind the slider's value to that variable. Or, if you're using a reference outlet, you'd need:

property mySlider: missing value

And then call something like:

mySlider's setIntegerValue_("100" as integer)
分享给朋友:
您可能感兴趣的文章:
随机阅读: