hello all,
I having trouble sorting through a dataset and populating the results into a
listbox. The code I have is listed below. If anyone can offer some assistance,
it would be greatly apprieciated.
function goSearch():Void {
//goto first data set record
_root.data_ds.first();
while (_root.data_ds.hasNext()) {
if (_root.data_ds.type == _root.lookType.text) {
list.removeAll();
trace(_root.data_ds.title);
////////////////////////////////////////////////
//data_ds.dataProvider = result;
_root.data_ds.title = pcArray;
var pcArray = new Array();
length = data_ds.length;
for (i=0; i<length; i++) {
pcArray.addItem({label:data_ds.title, data:{title:data_ds.title,
id:data_ds.id, photourl:data_ds.photourl, desc:data_ds.desc, pdf:data_ds.pdf}});
}
list.dataProvider = pcArray;
////////////////////////////////////////////////
}
_root.data_ds.next();
}
}
searchBut.onRelease = function() {
goSearch();
};
stop();
GeorgeWS - 25 Mar 2005 18:56 GMT
Why not sort it in the query?