NSSlider 循环
我正在我的项目中建立一个 NSSlider,当向上或向下移动时需要调用不同的方法。因此,如果向上移动,它将执行一种方法,即一个 AppleScript,如果向另一个方向移动,则执行相反的操作,即另一个 AppleScript。我会用 IF 循环还是其他东西来做到这一点?提前致谢!
I am instituting a NSSlider into my project that needs to call different methods when moved up or down. So if it is moved up it will do one method, which is a AppleScript, and the opposite if moved in the other direction, another AppleScript. Would I do this with an IF loop or something else? Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该跟踪滑块的旧值,然后与新值进行比较,看看它是向下还是向上移动。
you should keep track of the old value of the slider, and then compare with the new one to see if it has moved down or up.