wxruby-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Wxruby-dev] Building on OS X and 1.8...


From: Kevin Smith
Subject: Re: [Wxruby-dev] Building on OS X and 1.8...
Date: 30 Jun 2003 19:38:54 -0700

On Mon, 2003-06-30 at 15:24, Richard Kilmer wrote:
> if /linux/ =~ RUBY_PLATFORM || /powerpc-darwin/ =~ RUBY_PLATFORM

Cool. Do you want me to make that change and check it in on my end?

> 2) In your wxpp.rb you do a lot of gsub!(match_string, 
> replacement_string) instead of gsub!(regex, replacement_string).  This 
> raises warnings on my installation of Ruby 1.8.  It seems that you are 
> supposed to only use (regex, string) on 1.8.
> 
> What version of Ruby are you using?

Interesting. I'm still using Ruby 1.6.8 (the current stable version).
Bummer--I much prefer the simplicity and safety of replacing one string
with another. Oh well, gotta go with the crowd. I'll take care of it.

> 3) I get this after those sets of warnings:
> 
> ****** RubyToCpp error: ()
> wxpp.rb:59:in `getRubyToCppConversionMethod': unhandled exception
>          from wxpp.rb:227:in `convertVariables'
>          from wxpp.rb:222:in `each_index'
>          from wxpp.rb:222:in `convertVariables'
>          from wxpp.rb:650:in `implementMemberMethods'
>          from wxpp.rb:639:in `each'
>          from wxpp.rb:639:in `implementMemberMethods'
>          from wxpp.rb:949:in `handleImplement'
>          from wxpp.rb:939:in `handleImplementClass'
>          from wxpp.rb:832:in `command'
>          from wxpp.rb:772:in `parse'
>          from wxpp.rb:769:in `foreach'
>          from wxpp.rb:769:in `parse'
>          from wxpp.rb:983
> make: *** [button.cpp] Error 1
> 
> and it dies.
> 
> further investigation (puts parameter.cppClass in 
> getRubyToCppConversionMethod)
> 
> (wxWindow*
> wxWindowID
> wxString&
> wxPoint&
> wxSize&
> long
> wxValidator&
> wxString&
> ()
> 
> That last one yields the error.

Very interesting. Sounds like it might be a Ruby 1.8 thing. I suspect
the culprit is line 170:
        parmListString.gsub!('[()]', '')
This should have converted '()' into '', and it looks like it didn't.
AH, because it's a regex hidden inside a string! Oy. I've checked in a
change to:
        parmListString.gsub!(/[()]/, '')

I looked at all the other gsubs, and they all appear to be correct.
They'll still give warnings in 1.8, but they should still do what
they're supposed to.

Thanks!

Kevin






reply via email to

[Prev in Thread] Current Thread [Next in Thread]