[Gtk-sharp-list] Using ListStore.SetDefaultSortFunc

Arjen Wiersma a.wiersma@nl.tiscali.com
Wed, 11 Feb 2004 16:31:08 +0100

Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Hi Mike,

> When people go to workarounds and don't file bugs for the stuff they
> worked around, it hard for me to know something needs fixed.


> Please file a bug for the API you need, and if possible, provide as
> minimal a test sample as possible so I know if I've fixed it for you.

Well.. see thats actually the problem; I am pretty clueless as how to
actually use SetDefaultSortFunc;

it's defined as 'public virltual void SetDefaultSortFunc
(TreeIterCompareFunc sort_func, IntPtr user_data, DestroyNotify
destroy)' in monodoc. So my closest guess, also based on looking at the
C libs, is that it should be invoked as such:

TreeIterCompareFunc(SerieSortFunc), this.Model, new

Where SerieSortFunc is defined as:

private int SerieSortFunc(TreeModel model,IntPtr a, IntPtr b)

and the destroy notify as such:

private void ConanTheDestroyer()

The Mono C# compiler then barks:

Exception caught by the compiler while compiling:
   Block that caused the problem begin at: ./SerieTreeView.cs: (20)
                     Block being compiled: [./SerieTreeView.cs:
(23),Internal: (1)]
System.ArgumentNullException: null key
Parameter name: key

which in itself doesn't sound so good :)...

I am completely new to Gtk (and thus Gtk#) and also just comming around
to C# itself... so if this is a bug I will file it.. if it is just user
error... well i'll just subject myself to M-x psychoanalyze-pinhead for
an hour....

Kindest regards,

 .O. Arjen Wiersma <a.wiersma@nl.tiscali.com>
 OOO To boldly frobnicate what no newbie has groked before!

Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

Version: GnuPG v1.2.3 (GNU/Linux)