穿鞋比赛什么时候结束?

发布于 2024-07-13 05:29:04 字数 352 浏览 4 评论 0原文

使用 Shoes,我希望在窗口销毁时执行一个块。 我以为我可以使用 finish 事件,但在下面的代码中,显示“Starting”,但从未显示“Finished”。


Shoes.app(:title => "Test") do

    flow do
        start do |obj|
            alert("Starting")
        end

        finish do |obj|
            alert("Finished")
        end

        button "Hello"
    end
end

Using Shoes, I would like to have a block executed upon window destruction. I thought I could use the finish event, but in the following piece of code, "Starting" is displayed, but "Finished" is never shown.


Shoes.app(:title => "Test") do

    flow do
        start do |obj|
            alert("Starting")
        end

        finish do |obj|
            alert("Finished")
        end

        button "Hello"
    end
end

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

橘和柠 2024-07-20 05:29:04

经过更多研究后...

看来 Shoes 中的 finish 事件目前仅用于下载。

此外,目前似乎没有 onclose 事件,但已经讨论过。

http://article.gmane.org/gmane.comp.lib.shoes/2976抱歉

回答我自己的问题,但将知识分享给其他人。

After doing some more researching...

It appears that the finish event in Shoes is currently only used for downloads.

In addition, it appears there is no onclose event currently, but it has been discussed.

http://article.gmane.org/gmane.comp.lib.shoes/2976

Apologies for answering my own question, but putting the knowledge out there for others.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文