All pastes #273961 Raw Edit

mash

public text v1 · immutable
·published 2006-12-10 08:39 UTC
rendered paste body
// Get the error message (on last line)
// glade.cs(288,39): error CS0165: Use of unassigned local variable `currIter'



		//* Load data into liststore - first remember olde sort order
 		int currSortCol;
        SortType currSortType;
		this.usersListStore.GetSortColumnId(out currSortCol, out currSortType);
		
		TreeModel tModel;
		TreeIter currIter;
		bool iterFound = false;
		
		TreeSelection tSelect = this.treeView.Selection;
		Array treePaths = tSelect.GetSelectedRows(out tModel);
		// remove compiler warning
		if(tModel != null)
			tModel = null;
					
		foreach(TreePath tPath in treePaths){
			
			if(this.usersListStore.GetIter(out currIter, tPath)){
				Console.WriteLine("YES");
				iterFound = true;
			}
		}
			
		this.usersListStore.Clear();
		string[] lines = tempString.Split('\n');
		foreach (string line in lines){
			if(line != ""){
				string[] items = line.Split('\t');
				this.usersListStore.AppendValues (items[0], items[1], items[2],items[3]);
			}
		}
		currSortCol = (currSortCol > 0) ? currSortCol : 1 ;
		this.usersListStore.SetSortColumnId(currSortCol, currSortType);
		
		if(iterFound){
			this.treeView.Selection.SelectIter(currIter);
		}
	}