[Java-gnome-developer] Question about DataColumn.getType()
Brought to you by:
afcowie
From: Clint A. <ca...@au...> - 2005-03-23 14:25:32
|
The getType() method in DataColumn has a line that confuses me, maybe someone can explain: public Type getType(){ if (type != null){ Type t = type; type = null; // <-- here's the confusing line -- return t; }else throw new RuntimeException("The type either hasn't been set, or has already been requested and destroyed"); } Why is type being set to null here? The reason I'm worrying about this is that I'm trying to construct a ListStore that is created with an array of DataColumnStrings. When the array gets passed to the ListStore constructor, the DataColumn.getType() method is called, and now all my DataColumnStrings have a type of null! :-/ |