Magiclouds Magicloud
2004-Dec-21 06:16 UTC
[fxruby-users] Will there be a reference or even a guide for fxruby 1.2.*?
I think it is the time.... _________________________________________________________________ ÓëÁª»úµÄÅóÓѽøÐн»Á÷£¬ÇëʹÓà MSN Messenger: http://messenger.msn.com/cn
Lyle Johnson
2004-Dec-21 07:21 UTC
[fxruby-users] Will there be a reference or even a guide for fxruby 1.2.*?
On Dec 21, 2004, at 5:16 AM, Magiclouds Magicloud wrote:> I think it is the time....Are you talking about these? http://www.fxruby.org/1.2/doc/book.html http://www.fxruby.org/1.2/doc/api/ Lyle
I''m using FxRuby that ships with Ruby 1.8.1 (version 1.0.28 I believe). I''d like to be able to select multiple files at a time in a file dialog. I''m using FxFileDialog. The 1.0 api docs say that there is a "filenames" attribute that represents a list of all files selected so far. In my version of FxRuby accessing that attribute results in a method not found error. Also the api says FxFileDialog has a selectmode attribute but no docs on what to set it to so that I might be able to select multiple files at once. I''ve seen FxFileSelector but I couldn''t get it working in the past (filenames again resulting in a no such method error). Is it what I want to be working with anyway? Or will none of this work until FxRuby 1.2 is used? Or was this fixed post 1.0.28? Any help appreciated. On another topic when should I port my app to FxRuby 1.2? I want to use the FxRuby installation that is shipped in the standard ruby distribution to make installation of my program as easy as possible. Will FxRuby 1.2 become THE preferred development path and perhaps make it into the distribution soon?
Joel VanderWerf
2004-Dec-21 13:41 UTC
[fxruby-users] Will there be a reference or even a guide for fxruby 1.2.*?
Lyle Johnson wrote:> http://www.fxruby.org/1.2/doc/api/This still has some 1.0 remnants in at least one place: FXTable#leadingRows.
DeZonia, Barry
2005-Jan-04 13:02 UTC
[fxruby-users] FxRuby 1.2.2 and earlier: various FxFileDialog errors
I''ve been porting my FxRuby 1.0.28 app to 1.2.2 and I''ve come across a number of errors. Fatal runtime error Using the FXFileDialog attribute "filenames" results in a method not found error when it is invoked. This is true for both FxRuby 1.2.2 and 1.0.28. This is especially problematic as the only way to get the filenames out of the dialog that I can find is to use a class member other than new as the constructor (such as getOpenFilenames) which results in diminished functionality (e.g. you can''t remember and use the last directory and pattern specified by the user) since getOpenFilenames returns an array of selected files. Runtime error with workaround When you specify the path in getOpenFilenames as a directory the dialog starts one directory up. For instance, if you specify c:\images\8bit as the directory you want to show it shows c:\images instead and selects 8bit in the file field. This can be worked around by making sure the path you pass in ends in "/" or "\". Documentation errors getOpenFilenames, getOpenDirectory, getOpenFilename, and getSaveFilename don''t specify what they return. The parameter "initial" passed to three of them has no description and is too opaque for me to figure out what it is.
DeZonia, Barry
2005-Jan-04 15:58 UTC
[fxruby-users] RadioButtons not working right in FxRuby 1.2.2?
When I run my own app, as well as button.rb from the examples subdirectory, the RadioButtons within a GroupBox are not deselecting the previous choice and once toggled on will not toggle off. Is anyone else seeing this? I''m using FxRuby 1.2.2 that shipped with the one click Windows installer Ruby 1.8.2 final.
Joel VanderWerf
2005-Jan-04 18:54 UTC
[fxruby-users] RadioButtons not working right in FxRuby 1.2.2?
DeZonia, Barry wrote:> When I run my own app, as well as button.rb from the examples subdirectory, > the RadioButtons within a GroupBox are not deselecting the previous choice > and once toggled on will not toggle off. Is anyone else seeing this? > > I''m using FxRuby 1.2.2 that shipped with the one click Windows installer > Ruby 1.8.2 final.You can use data targets, since GroupBox no longer imposes this functionality. Advertisement: You can also use FoxTails (on RAA), which has its own targeting mechansim that you may feel is more ruby-like. The current version of FoxTails has a "field" construct, a new layer on top of the targeting mechanism, which makes this even simpler, almost like scanf: class FieldsWindow < FXMainWindow include FTField observable :my_radio def initialize(*args) # ... self.my_radio = 2 field("%r radio one %r radio two %r radio three", [:my_radio, 1], [:my_radio, 2], [:my_radio, 3]) That''s all it takes to have three radio buttons on a line, all tied into the same variable, my_radio, which takes the values 1,2 and 3 depending on the button pressed. The fields don''t have be on the same line, and there are other options like %v for a checkbox, %f (and %6.2f etc) for float, %m for a pop-up option menu to select from an array of objects, %s for string, %d for int, etc. Since the variable is "observable", you can attach blocks of code ("observers") that are triggered when its value changes, so you can keep other controls and views consistent. The field string can also include a %| specifier to make things line up inside a FXMatrix. You can also attach blocks of code for input validation. See examples/fields.rb for, well, examples. The catch? FoxTails was designed for Fox 1.0, though I am using it with 1.2 by defining some extra methods that convert argument lists, define aliases, and so on--just enough of a 1.0/1.2 compatibility layer to make FoxTails work. I can send that "dynamic patch" file to anyone who is interested. The next release will either include the patch (to support both 1.0 and 1.2) or support only 1.2.