FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

What to do about next() in ListG

 
Post new topic   Reply to topic     Forum Index -> gtkD
View previous topic :: View next topic  
Author Message
heromyth



Joined: 26 Nov 2006
Posts: 46

PostPosted: Thu Apr 10, 2008 4:35 am    Post subject: What to do about next() in ListG Reply with quote

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
View user's profile Send private message
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Thu Apr 10, 2008 1:05 pm    Post subject: Re: What to do about next() in ListG Reply with quote

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
View user's profile Send private message
heromyth



Joined: 26 Nov 2006
Posts: 46

PostPosted: Fri Apr 11, 2008 1:35 am    Post subject: Re: What to do about next() in ListG Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> gtkD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group