0
我的gtk對話窗口從不關閉,直到程序的最後一個任務。Ruby Gtk對話框不關閉
dialog = Gtk::Dialog.new(
"Test dialog",
nil,
Gtk::Dialog::MODAL,
[ Gtk::Stock::OK, Gtk::Dialog::RESPONSE_OK ],
[ Gtk::Stock::CANCEL, Gtk::Dialog::RESPONSE_CANCEL ]
)
和Windows破壞
dialog.run do |response|
case response
when Gtk::Dialog::RESPONSE_OK
# do some minor things here
File.user # file class for method user
end
end
dialog.destroy
}
正如我所說的問題是窗戶,只有當所有任務都在File.user
類method.I完成關閉之前想所有的任務都關閉窗口ended.I嘗試,但都沒有成功
dialog.run do |response|
case response
when Gtk::Dialog::RESPONSE_OK
# do some minor things here
dialog.destroy
File.user # file class for method user
end
end
}