|
Re: FXRuby usage: Capturing results from an FXDialogBox: msg#01149lang.ruby.general
Stephan Kämper wrote: Now, during querying the main program shouldn't be available, thus some Yes. Up to now I wrote the following stuff, which is likely not the most elegant way, but let's follow the "Make it parse, make it work, make it nice, make it fast (IF neccessary" maxime for a moment. (But then I'm open for any improvements!) <snip> Now that doen't work: The dialog will never quit. Your guess is exactly right. Once the dialog is displayed it needs some hint (such as an ID_ACCEPT or ID_CANCEL message) to tell it to go away. What's the ruby way to accomplish this? For most cases like this you shouldn't actually need to subclass FXDialogBox. I would recommend that you take a look at the imageviewer.rb example program that comes with FXRuby, because it pops up a few modal dialog boxes here and there to collect inputs from the user. In particular, take a look at the onCmdScale() and onCmdCrop() methods in that example. I have the stron feeling that my way of fiddling with @result may not be too terribly rubyish - is there a better (Ruby) way to do this? If you use the technique shown in the ImageViewer example, the user's selection should get mapped directly into an FXDataTarget. But another equally easy approach would be to check the two radio buttons to see which one is set (by calling FXRadioButton#check). Hope this helps, Lyle
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: Q) about singleton methods and access control, Bennett, Patrick |
|---|---|
| Next by Date: | Building tables dynamically with CGI class, Jason Underdown |
| Previous by Thread: | FXRuby usage: Capturing results from an FXDialogBox, Stephan Kämper |
| Next by Thread: | RE: FXRuby usage: Capturing results from an FXDialogBox, David Naseby |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |