[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Missing(?) method 'retrieveItem' in class FXList with FXRuby 1.2.2

Stephan Kämper

12/27/2004 8:01:00 PM

Hi rubyists,

I just made the step from an older 1-click-installer to the latest one,
which happens to include FXRuby 1.2.2.

And here's my problem:

I have an FXList object and would like to iterate over the elements to
do some processing. "each" was the method of choice back in the times of
FXRuby 1.0.29 which was what I used before.

BTW, the versions are:
irb(main):043:0> Fox.fxversion
=> "1.2.9"
irb(main):044:0> Fox.fxrubyversion
=> "1.2.2"

E:\>ruby -v
ruby 1.8.2 (2004-12-25) [i386-mswin32]

Now I get this error message:

C:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.2.2-mswin32/lib/fox12/iterators.rb:62:in
`each': undefined method `retrieveItem' for #<Fox::FXList:0x32a5da0>
(NoMethodError)
from
C:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.2.2-mswin32/lib/fox12/iterators.rb:61:in
`upto'
from
C:/ruby/lib/ruby/gems/1.8/gems/fxruby-1.2.2-mswin32/lib/fox12/iterators.rb:61:in
`each'
from E:/retritm.rb:54:in `on_process_list'
from E:/retritm.rb:66:in `run'
from E:/retritm.rb:66:in `run'
from E:/retritm.rb:73

Indeed, iterators.rb implements 'each' by yielding 'retrieveItem'.
After downloading the source code of FXRuby and rdoc-ing the
'rdoc-sources' directory (seemed appropriate), FXList does list
'retrieveItem' as one of FXList's methods.

One the other hand, with irb I get this:

irb(main):001:0> require "fox12"
=> true
irb(main):002:0> Fox::FXList.instance_methods.select{ | m | m =~ /^re/ }
=> ["releaseClipboard", "respond_to?", "recalc", "reparent", "require",
"removeChild", "reject",
"removeItem", "remHotKey", "require_gem", "releaseSelection",
"repaint", "resize"]
irb(main):003:0>

Well. This seems to confirm that 'retrieveItem' isn't there.

Is it my fault? If so, what did I do wrong?

Should 'retrieveItem' be a method of FXList? Should it be removed from
the docs? Should I report a bug (in case it's not my fault)?

Hope you had a merry rubying Christmas

Stephan
1 Answer

Lyle Johnson

12/28/2004 12:35:00 AM

0

On Tue, 28 Dec 2004 05:01:53 +0900, Stephan Kämper
<Stephan.Kaemper@schleswig-holstein.de> wrote:

> Is it my fault? If so, what did I do wrong?

Not your fault, just a bug. Please do report it, here:

http://rubyforge.org/tracker/?atid=1223&group_id=300&f...

Thanks,

Lyle