AppleScriptObjC:进度条不增加
我正在尝试在 AppleScriptObjC 中实现进度栏更新。我已通过 IB 连接进度条并尝试通过incrementBy(5) 增加进度条更新。 Indertermate 属性设置为 false。 IB 连接很好,因为如果我将 Inderterminate 设置为 true 并取消注释启动/停止动画的代码,它就可以正常工作。这是我得到的错误“-[NSProgressIndicatorincrementby:]:无法识别的选择器发送到实例0x2007e2220”
下面是代码,
property ProgressBar : missing value
on MyBtnClick_(sender)
(*.. some code ..*)
ProgressBar's incrementby_(5)
ProgressBar's displayifNeeded()
--ProgressBar's startAnimation_(me)
--ProgressBar's stopAnimation_(me)
end MyBtnClick_
感谢Adv中的任何指针。
问候, 杰西
I am trying to implement a Progress bar update in AppleScriptObjC. I have connected the progressbar thru IB and trying to increment the Progressbar update via incrementBy(5). The Inderterminate property is set to false. the IB connection is fine because if I set the Inderterminate to true and uncomemnt the code to start/stop animation it works fine. this is the Error I get "-[NSProgressIndicator incrementby:]: unrecognized selector sent to instance 0x2007e2220"
following is the code
property ProgressBar : missing value
on MyBtnClick_(sender)
(*.. some code ..*)
ProgressBar's incrementby_(5)
ProgressBar's displayifNeeded()
--ProgressBar's startAnimation_(me)
--ProgressBar's stopAnimation_(me)
end MyBtnClick_
Thanks in Adv for any pointers.
regards,
Jesse
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
尝试incrementBy_——大小写很重要。
Try incrementBy_ -- case matters.
好吧,“发送到实例的无法识别的选择器”意味着发送的命令是未知的,因此您发送给它的命令意味着它不存在,但是如果您尝试发送消息以使进度条设置其进度%,则, 我可以帮你! :D,我使用“setDoubleValue”命令来设置进度条状态,您也不需要 startAnimation 和 stopAnimation 它:D
好的,所以这里有一个脚本将存储当前进度,当运行 MyBtnClick 时,它将添加 5% 到进度条
希望这有帮助:D
Ok so, "unrecognized selector sent to instance" means that the command sent is unknown so the command your sending to it means it does not exist, however If you are trying to send a message to make the progress bar to set its progress % then, i can help you! :D, I use the "setDoubleValue" command to set the Progress bars status and you don't need to startAnimation and stopAnimation it either :D
ok so here is a script that will store the current progress and when MyBtnClick is run, it will add 5% to the progress bar
hope this helps :D