[Kde-bindings] Bug in rb config compiler related to enums

Arno Rehn arno at arnorehn.de
Thu Aug 19 13:23:45 UTC 2010


On Thursday 19 August 2010 12:40:14 Robert Riemann wrote:
> On Thursday 19 August 2010 12:29:22 Robert Riemann wrote:
> > Hi korundum4!
> > 
> > 
> > When I create my KConfigSkeleton with the ruby generator ,
> > invalid ruby
> 
> code is genereted:
> >   class EnumQuality
> >   
> >     640x360 = 0
> > 
> > 854x480 =
> 
> 1
> 
> >     480x360 = 2
> >     1280x720 = 3
> >     1920x1080 = 4
> >     4096x3072
> 
> = 5
> 
> >     COUNT = 6
> >   
> >   end
> > 
> > btw:: maybe it would be better to use a
> 
> module
> 
> > instead of a class.
> > 
> > Best regards,
> > Robert
> 
> It doesn't work
> even if add a prefix to each option ("r" in this case).
> 
> itemQuality =
> ItemEnum.new(currentGroup(), "Quality", @quality.toInt, valuesQuality,
> EnumQuality::r480x360)
> 
> gives: undefined method `r480x360' for
> YoutubeSettings::EnumQuality:Class (NoMethodError)
IIRC, constants in Ruby have to start with a capital letter. Try to prefix 'R' 
instead of 'r'.

-- 
Arno Rehn
arno at arnorehn.de



More information about the Kde-bindings mailing list