Prev: Cheap Wholesale Adidas Shoes (paypal payment)
Next: How do I configure ruby to mysql by default instead of sqlit
From: Terry Michaels on 3 Aug 2010 01:31 In my shoes app, I have a situation like this: There is a separate window that displays special data. Certain buttons call a function which should do the following: * Create the window if it has not been created yet * Replace the contents of the window (without closing it) if the window has already been created * Recreate the window if it has been closed after being created So far, I have something like so: def set_region_view(region) # window never created before if @region_view_window == nil @region_view_window = window :width => 200, :height => 200 do para region end # window created already, so contents replaced else @region_view_window.app do clear para region end end end But this code cannot recreate the window if it has been closed by the user. Conceptually this seems very simple to implement, but I can not tell from the Shoes manual what commands I could use to do it. Please advise. -- Posted via http://www.ruby-forum.com/. |