flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com>
Subject Re: [Mustella] still failing, must fix
Date Tue, 27 May 2014 19:57:48 GMT
This is Justin's test case that replicates the problem in English.

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
			import mx.collections.Sort;
			import mx.collections.SortField;
			private function triggerFindConditionRTE():void{
				var a:Array = new Array();
				var s:Sort = new Sort();
				s.compareFunction = cmpFn;
				var sfArray:Array = new Array();
				sfArray.push(new SortField("0"));
				sfArray.push(new SortField("field1"));
				var o:Object = new Object();
				o["0"] = undefined;
				o["field1"] = 2;
				s.fields = sfArray;
				s.findItem(a, o, null);
			// WTF?
			private function cmpFn(o1:Object, o2:Object):void{

You should get an arg count mismatch.  By changing the (!hasFieldName)
test on Sort.as line 413 I got the expected result ("Find criteria must
contain all sort fields")

On 5/27/14 12:53 PM, "Michael A. Labriola" <labriola@digitalprimates.net>

>>Mike, your thoughts on the logic?  The test sets up two SortFields and a
>>compare function on the Sort (not the SortFields) then calls findItem.
>The first SortField's field name is a non-existent field.  I think the
>old logic would see if the field existed in the data item.  The new logic
>seems to assume the fieldName exists as long as there is no SortField
>compare function and skips the check if the field exists in the data.
>Let me setup and replicate this scenario and mine locally and see what I
>can do.

View raw message