I know view helpers are not currently recommended to use with
cairngorm, but am I going to use one here?

In one view I call this filter function whenever a textInput control
is changed.

model.companyObjectsFilter.filterFunction = doCompanyNameFilter;
model.companyObjectsFilter.refresh();}

private function doCompanyNameFilter(item:Object):Boolean{
var result:Boolean;
var companyName:String(item.CompanyName.toUpperCase());
if(companyName.indexOf(companyNameTI.text.toUpperCase()) != -1){
result = true;}
return result;}

This works great, however, say that in another view a comboBox bound
to  the same arrayCollection was previously selected. Then if the
above filter does not return a true value the app crashes because the
combobox  now has nothing to bind to.
Will I need to copy the arrayCollection from the model before my view
filters it? And if so is it best to use a viewHelper?

Any help much appreciated
Barry

Reply via email to