Get Iter/Path from CellRendererCombo



Is there any way to do this

All methods seem to require path to get iter and vice-versa

This was the only way to achieve what I wanted (seriously unscalable
and prone to error)

my $combo_iter  = $cell->get("model")->get_iter_first;
      my $found_match = 'FALSE';
my $new_text;
while ( $combo_iter ) {

         if ( $cell->get("model")->get( $combo_iter, 1 ) eq $val ) {
            $found_match = 'TRUE';
            $new_text    =  $cell->get("model")->get( $combo_iter, 0 )
             ;    # It's possible that this is a bad idea
            last;
         }

         $combo_iter = $cell->get("model")->iter_next( $combo_iter );

      }



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