Sunday, March 27, 2011

When does the finish event get called in shoes?

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


From stackoverflow
  • 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.

0 comments:

Post a Comment