[Vala] error: "missing generic type arguments"



Hello,

I have downloaded a code sample for drag&drop on gtk, but I get an error compiling it:


    private bool on_drag_drop (Widget widget, DragContext context, int x, int y, uint time) {
      if (context.targets != null) {
        
        Atom target_type = (Atom) (context.targets.nth_data (0)); // THIS GIVE ERROR !!!!
        
        stderr.printf("data %s\n", target_type.name());
        // Request the data
        //Gtk.drag_get_data (widget, context, target_type, time);
      }

The error is "missing generic type arguments".
context is of type Gdk.DragContext and context.targets is a List<Gdk.Atom>.

I have no idea on how to fix that.

I'am using valac 0.8.1 on debia squeeze.

Thanks in advance.

--
Andy




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