View previous topic :: View next topic |
Author |
Message |
heromyth
Joined: 26 Nov 2006 Posts: 46
|
Posted: Thu Apr 10, 2008 4:35 am Post subject: What to do about next() in ListG |
|
|
There are first() and last() in glib.ListG, and what about the next()?
Here is something in documents of GTK+:
g_list_next()
Code: | #define g_list_next(list) |
A convenience macro to gets the next element in a GList.
list : an element in a GList.
Returns : the next element, or NULL if there are no more elements.
In addition, these codes run failed:
Code: | ListG columnList = dataGridTreeView1.getColumns();
writefln(columnList.length()); |
Are there something wrong? Thanks for any help! |
|
Back to top |
|
|
Mike Wey
Joined: 07 May 2007 Posts: 428
|
Posted: Thu Apr 10, 2008 1:05 pm Post subject: Re: What to do about next() in ListG |
|
|
heromyth wrote: | There are first() and last() in glib.ListG, and what about the next()?
Here is something in documents of GTK+:
g_list_next()
Code: | #define g_list_next(list) |
A convenience macro to gets the next element in a GList.
list : an element in a GList.
Returns : the next element, or NULL if there are no more elements. |
svn r493 adds next and previous.
Quote: | In addition, these codes run failed:
Code: | ListG columnList = dataGridTreeView1.getColumns();
writefln(columnList.length()); |
Are there something wrong? Thanks for any help! |
It works in the small test i did, it could be that getColumns() returns null (an empty list), then the call to length() will get you a segfault. |
|
Back to top |
|
|
heromyth
Joined: 26 Nov 2006 Posts: 46
|
Posted: Fri Apr 11, 2008 1:35 am Post subject: Re: What to do about next() in ListG |
|
|
Quote: | In addition, these codes run failed:
Code: | ListG columnList = dataGridTreeView1.getColumns();
writefln(columnList.length()); |
Are there something wrong? Thanks for any help! |
It works in the small test i did, it could be that getColumns() returns null (an empty list), then the call to length() will get you a segfault.[/quote]
Thanks, let me check it again. |
|
Back to top |
|
|
|