I am playing a little with drag and drop under gtk#. When calling
protected virtual void OnDragDataGet (object o, Gtk.DragDataGetArgs args)
{
byte[] data = GetSomeData();
args.SelectionData.Set(args.Context.Targets[0], 0, data);
}
an error occurs:
Gtk-CRITICAL **: _gtk_selection_request: assertion `(data.format >= 8) && (data.format % 8 == 0)' failed
however setting the format to 8 works fine:
protected virtual void OnDragDataGet (object o, Gtk.DragDataGetArgs args)
{
byte[] data = GetSomeData();
args.SelectionData.Set(args.Context.Targets[0], 8, data);
}
I have found some examples on drag and drop, all use 8 as the format for sending the data. (Using 0 was acually a typo.) However I have not found what this format does, or why 8 works, whereas 0 does not.
Can someone explain what "fomat" does ?