Re: moving nodes in a tree



As I wasn't getting anywhere using move_before/after I decided to try
using the drag/drop interface instead. Sadly I'm not having much luck
there either. I write:

  my $source_path = $model->get_path($source_iter);
  my $draggable = $model->row_draggable($source_path);
  my $selection_data = $model->drag_data_get($source_path);

  warn "source_path=".$source_path->to_string."\n";
  warn "draggable=$draggable\n";
  warn "selection_data=$selection_data\n";

and I get:

  source_path=0:0:0:1:0
  draggable=1
  Use of uninitialized value in concatenation (.) or string at
  ./scop-tree-editor.pl line 768.
  selection_data=

What am I doing wrong there?

$model isa TreeStore and the view is showing well-defined data on screen
and other code can access the row data successfully with get().


BTW, further to my previous mail:
I'm trying to use $tree_store->move_after ($iter, $position) and
$tree_store->move_before ($iter, $position)

I've also noticed that the Perl interface won't let me have $position be
undef, which is documented as OK in the C interface (NONE) and the
Python interface (None).

I haven't managed to find any examples for any of these features.

Cheers, Dave



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