From: Vincent Fourmond Date: 2006-11-18T06:41:41+09:00 Subject: Re: qtruby and the ListViewItemIterator Nigel Wilkinson wrote: > Hi folks > > I'm trying qtruby out and have struck an issue I can't conquer. > > I have a listview widget which is populated with listviewitems and want > to iterate through the whole lot. > > The code snippet is > > it = Qt::ListViewItemIterator.new(@listView) > puts it.operator++() > /mainform.ui.rb:33:in `method_missing': undefined method `operator' for > # (NoMethodError) Well, the operator ++ is meant to be called directly ++ when written in C++. In ruby, however, that won't work as ++ is not an operator. You might want to try (untested): p it.send(:'++') Cheers ! Vince -- Vincent Fourmond, PhD student http://vincent.fourmond.neuf.fr/