[Gtk-sharp-list] Gendarme rules

Vladimir Giszpenc vladimir.giszpenc at gmail.com
Mon Jun 18 09:47:54 EDT 2007


Hi all,

After hunting down an error, I wanted to share the joy with the group.
 Apparently spelling is not the only thing that counts.  Order counts
too.

Gtk.TreeViewColumn col = new TreeViewColumn();
col.Title = "Whatever";
col.PackEnd(myRenderer, false); //PackStart works too
col.SetCellDataFunc(myRenderer, new TreeCellDataFunc (RenderFunc));

is not the same as

Gtk.TreeViewColumn col = new TreeViewColumn();
col.Title = "Whatever";
col.SetCellDataFunc(myRenderer, new TreeCellDataFunc (RenderFunc));
col.PackEnd(myRenderer, false);

Apparently, the column *must* be packed before SetCellDataFunc is
called.  It would have saved me quite some time if a warning had
alerted me.  If someone is compiling Gtk warnings for Gendarme, please
add a rule to help the next victim.

Of course, it would be great if either the documentation also warned
users or the ordering was not in fact necessary.

Good luck all,

Vlad


More information about the Gtk-sharp-list mailing list