 |
Forums |
Admin Start New Thread
By: Brett S Hallett
RE: A couple ideas for extending fxruby gener [ reply ] 2004-01-17 01:03
|
Glen, thanks for your input, have done most of your suggestions, but am still 'mulling' over the documentation format. I use Latex to create the docs, and .ps format appears to be the 'best' format to relaease in as the screen snapshots are include
as one file.,
Brett Hallett
|
By: Glenn Lewis
A couple ideas for extending fxruby generator [ reply ] 2004-01-07 16:41
|
Hi Brett! This, I think, is a very cool idea. It has jump-started me into using fxruby. I have a few suggestions for you.
First, if you add the following section to the end of rubyfxgencode.rb, the user can simply type something like "rubyfxgencode.rb demo3.fxs demo3.rb" and also put a line like this in their Makefile so that they are not forced to use the GUI version (rubyfxgen.rb):
if ($0 == __FILE__)
if (ARGV.size < 2)
puts "Usage: rubyfxgencode.rb inFilename utFilename"
exit
end
print "rubyfxgencode (Ruby Version:#{RUBY_VERSION})\n"
print "Generate From : ",ARGV[0], "\n"
print " To : ",ARGV[1], "\n"
inr, utr = rubyfxgencode( ARGV[0], ARGV[1] )
# start conversion, pass in/ut filenames and return number of lines processed
# inreccount.value = inr # recover and display record counters
# utreccount.value = utr #
end
Secondly, it would be nice if you provided "demo1.fxs", "demo2.fxs" and "demo3.fxs" in your tarball, so that people can immediately try out the 3 examples you list in your documentation.
Although PostScript is adequate for your documentation, you obviously created the original docs with some other tool... maybe LaTeX? Providing the original would allow people to print on different devices, like U.S. Letter size, for example. I personally converted it to PDF and then performed OCR on it to copy the text out of it.
Finally, I was thinking about the last demo that you gave, where you have to go in and add your code to a particular section for the buttons to make a complete application... Wouldn't it be nice if you could have added those one-liners into your original .fxs specification? Just a thought.
One other point, I guess, is that I could never get my results to look like yours... my GUI's all came up with everything left-justified, whereas in your documentation, the widgets showed up as being centered. (I tried it on WinXP with Ruby 1.8.0-10 from the Pragmatic Programmers installable version.) And I could never get the last demo to show the ":" after the word "Giving" for some reason. Weird.
Overall, though, I think this is a really cool idea, and appreciate that you made it available! It is definitely a great way to jump in to using FxRuby in a fast way.
Thanks again!
-- Glenn Lewis
|
|
 |