Re: [Vala] List behavior with new operator



On Sam, 2006-08-26 at 21:57 -0500, Cayle Graumann wrote:
I've discovered something:  If you use a List object, be sure not to
use the new operator followed by append.  It adds a null object to the
list, that will cause you to get failed assertions when you iterate
through the List.
[...]
I don't know if this is something fixable in Vala because it seems the
result of the way GList is implemented in GLib, but maybe something
can be done with the new operator so as not to actually create a null
object.  I would image this behavior holds true for some of the other
GLib container classes as well.

Will probably special case the constructor of GList and GSList to just
return null, thanks for the report.

I do want to say thanks to Jurg and the rest of the developers for
getting the foreach to work across all the containers.  Having to use
Iterators in java is one of the few things I find annoying about
Java. 

Foreach implementation for GLists is not as clean as it should be but it
should be improved over time.

Thanks again and keep up the good work.  I'm having fun with vala,
hope you are too.

Thanks for your feedback, nice to hear that.

Regards,

Jürg




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]