« Return to Thread: Warning from FXRuby

Re: Warning from FXRuby

by Lyle Johnson-4 :: Rate this Message:

Reply to Author | View in Thread

Thanks for the information, David. Yes, it looks like for whatever reason I've got a weird combination of tabs and spaces for the indentation in that part of the file; that can be easily fixed. Since they are just warnings, you can presumably ignore them until I get a patched version out. Looks like Ruby 1.9.1 is more picky about indentation, which is kind of an interesting change...

I'm also glad to see that it (apparently?) built without any problems. I don't think a lot of folks are playing with Ruby 1.9.1 yet, much less trying FXRuby with it. I know that I'm still seeing a few unusual things with FXRuby under Ruby 1.9.1, so please let me know what you observe.

Thanks,

Lyle

On Apr 16, 2009, at 1:51 PM, David Toll wrote:


I have the following program, named hello.rb (you may recognise this - it is on page 15 of the FXRuby book):

      require 'fox16'
      app = Fox::FXApp.new
      main = Fox::FXMainWindow.new(app, "Hello World", :width => 200, :height => 100)
      app.create
      main.show(Fox::PLACEMENT_SCREEN)
      app.run


When I run this on Red Hat EnterPrise Linux 5.3, 64-bit, with Ruby 1.9.1, FXRuby 1.16.19 and FOX 1.6.36, I get the following warnings:


      [toll@localhost ~]$ ruby -w hello.rb
      /usr/local/lib/ruby/gems/1.9.1/gems/fxruby-1.6.19/lib/fox16/core.rb:209: warning: mismatched indentations at 'end' with 'def' at 207
      /usr/local/lib/ruby/gems/1.9.1/gems/fxruby-1.6.19/lib/fox16/core.rb:210: warning: mismatched indentations at 'end' with 'class' at 205
      [toll@localhost ~]$


The offending code (lines 205-209 of core.rb) is:


      class FXScrollArea
        # Returns a reference to the scroll corner (an FXScrollCorner instance) for this window.
        def scrollCorner
          verticalScrollBar.next
        end
      end

Note that I do not get these warnings with Ruby 1.8.6-111, FXRuby 1.16.16 under Windows XP.

On the Linux system, I installed FOX and Ruby by downloading the tarball sources, and compiling them.  The FXRuby was then installed using gem install fxruby --remote, as shown on page 25 of the FXRuby book.


        Dave
____________________________________________________________
David C. Toll, Research Staff Member
IBM T. J. Watson Research Center, 19 Skyline Drive, Hawthorne NY 10532
Phone: 914-784-7019 (t/l 863)   Fax: 914-784-6205 (t/l 863)  email: toll@...
_______________________________________________
fxruby-users mailing list
fxruby-users@...
http://rubyforge.org/mailman/listinfo/fxruby-users


_______________________________________________
fxruby-users mailing list
fxruby-users@...
http://rubyforge.org/mailman/listinfo/fxruby-users

 « Return to Thread: Warning from FXRuby