I'm displaying my own classes in a ListView; the classes have a show() method and a Glade window definition, so I can edit the objects by double-clicking. I want these editor windows to be non-modal - I want to be able to open several of them at once, and go back to working in the parent window. So I set non-modal and delete-with-parent in Glade. When I close the parent window (the one that contained the ListView) the editor windows do not close. But when I then close them, the program crashes with a C:/Ruby193/lib/ruby/gems/1.9.1/gems/vrlib-1.0.16/lib/treeview/columns/CellRendererObject.rb:39:in `signal_emit_stop': destroyed GLib::Object Is there a way to do this? Or do I have to use only modal editor windows? Thanks, Chris
on 2014-04-30 09:17
on 2014-05-03 01:03
Just liik at the child window example. You don't need to set anything in glade. Its really simple. There are two types of windows in visual ruby: 1) No Parent (modal) Modal windows don't need to have a parent identified because you must close the child first (modal) 2) Parent set (non-modal) When you set the parent, visualruby knows that if the parent closes it should close the child too. Here's the code to open a child window: def buttonOpenChild__clicked(*argv) MyChildClass.new.show(self) #self = parent end def modalButton__clicked(*argv) MyChildClass.new.show end You pass the parent reference to the show() method to create a non-modal window. E
on 2014-05-03 03:20
Huh. That's how I was doing it. When I set modal "no" in Glade, and then don't pass self to show(), it works fine. Anyway, it's now working fine.