Can anyone tell me what I am doing wrong with this filter function. I
am passing in an array of valueObjects into the following filter function
public static function filterCallSchedule(o:*, index:int,
arr:Array):Boolean {
var modelLocator:AppModelLocator = AppModelLocator.getInstance();
trace('ooooooo - ' + o.callDate);
trace('mmmmmmm - ' + modelLocator.currentlySelectedCallDate);
trace(ObjectUtil.toString(o));
if (o.callDate == modelLocator.currentlySelectedCallDate) {
trace(true);
return true;
}
else {
trace(false);
return false;
}
}
This is some of the data returned as I trace this functions execution
ooooooo - Thu Jun 26 00:00:00 GMT-0400 2008
mmmmmmm - Mon Jun 30 00:00:00 GMT-0400 2008
(com.dynamicmedicalventures.De2ORApplication.vo::CallScheduleVO)#0
callDate = Thu Jun 26 00:00:00 GMT-0400 2008
callLocationID = 5
callScheduleID = 985
callScheduleNote = ""
createdBy = 1
createdDTS = Wed May 28 04:41:05 GMT-0400 2008
modifiedBy = 0
modifiedDTS = (null)
userID = 25
false
ooooooo - Fri Jun 27 00:00:00 GMT-0400 2008
mmmmmmm - Mon Jun 30 00:00:00 GMT-0400 2008
(com.dynamicmedicalventures.De2ORApplication.vo::CallScheduleVO)#0
callDate = Fri Jun 27 00:00:00 GMT-0400 2008
callLocationID = 5
callScheduleID = 986
callScheduleNote = ""
createdBy = 1
createdDTS = Wed May 28 04:41:05 GMT-0400 2008
modifiedBy = 0
modifiedDTS = (null)
userID = 2
false
ooooooo - Mon Jun 30 00:00:00 GMT-0400 2008
mmmmmmm - Mon Jun 30 00:00:00 GMT-0400 2008
(com.dynamicmedicalventures.De2ORApplication.vo::CallScheduleVO)#0
callDate = Mon Jun 30 00:00:00 GMT-0400 2008
callLocationID = 5
callScheduleID = 987
callScheduleNote = ""
createdBy = 1
createdDTS = Wed May 28 04:41:05 GMT-0400 2008
modifiedBy = 0
modifiedDTS = (null)
userID = 7
false
When this function runs through all of the data, I am left with an
empty array for the filtering. I can not understand why the last group
of data, where the two dates are identical does not return true and
therefore be included in the filtered array.
Does anyone have an idea of what I am doing wrong with this
Thanks
Don