I have most of it working:
public function testEmptyListCoercion():void{
var node:XML = 2;
var list:XMLList = node.@name;
var str:String = list;
assertTrue(str == '');
str = 'test'+list;
assertTrue(str == 'test');
There's mx.dummy.ContextMenuItem:
frameworks/projects/MXRoyale/src/main/royale/mx/dummy/ContextMenuItem.as
Which others are you looking for?
If you're on Windows, you can find things like this:
dir /s/b ContextMenuItem.as
findstr /s /m /c:"class ContextMenuItem" *.as
On 7/4/2022
I will look into it today.
Unfortunately the instance level 'plus' method is not suitable for the
general case, because an XMLList reference can also be null which would
cause an error in the generated js code that would not be present in AVM,
although this is an edge case. But it does mean that
It looks like BinaryOperatorEmitter is supposed to be emitting .plus(), but it
doesn’t seem to be doing so…
Harbs
> On Jul 4, 2022, at 6:32 PM, Harbs wrote:
>
> The logic should be something like this in pseudocode:
>
> if(isPlus && (isXMLish(righthand) || isXMLish(leftHand){
> if(isXM
The logic should be something like this in pseudocode:
if(isPlus && (isXMLish(righthand) || isXMLish(leftHand){
if(isXM On Jul 4, 2022, at 6:25 PM, Harbs wrote:
>
> I think the compiler should be using the “plus” XML method for string
> concatenation of XML.
>
>> On Jul 4, 2022, at 5:36 PM,
I think the compiler should be using the “plus” XML method for string
concatenation of XML.
> On Jul 4, 2022, at 5:36 PM, Greg Dove wrote:
>
> (it does equal undefined), but it
> seems it does concatenate as an empty string.
That also depends on the targetObject and targetProperty values.
It’s only undefined if there’s no targetObject OR there IS a targetProperty.
> On Jul 4, 2022, at 5:36 PM, Greg Dove wrote:
>
> An empty
> XMLList does not equal an empty string (it does equal undefined)
Yes the first one of those is the reason that it is tricky. An empty
XMLList does not equal an empty string (it does equal undefined), but it
seems it does concatenate as an empty string.
I will look at this tomorrow, we do have some client code that relies on
the undefined equality behavior and
The spec says that valueOf is supposed to return the XML object, so maybe
comparison uses valueOf, but string concatenation then uses toString()?
> On Jul 4, 2022, at 5:24 PM, Harbs wrote:
>
> OK. Here’s something to look at:
>
>xml = ;
>var props:XMLList =
OK. Here’s something to look at:
xml = ;
var props:XMLList = xml.Properties;
var bar:XMLList = xml.Bar;
This assert fails in Flash
assertEquals(bar , "","bar should evaluate to an empty string”);
with:
But that case seems to fail in Flash, so it’s likely correct...
> On Jul 4, 2022, at 5:14 PM, Harbs wrote:
>
> My test case covered what I found (assertEquals("" + xml.Baz.text(), "","An
> empty node should return an empty string”);)
>
> Here’s another case which I did not retest after my
I can't seem to find ContextMenuItem and others in the Flex code. What do I
do?
My test case covered what I found (assertEquals("" + xml.Baz.text(), "","An
empty node should return an empty string”);)
Here’s another case which I did not retest after my changes:
var xml = ;
var props:XMLList = xml.Properties;
trace(props.length())// 1
var bar:XMLList = xml.Bar;
if(bar &&
Thanks Harbs. By coincidence, I was actually intending to work on exactly
the same thing tomorrow local time, because Yishay encountered something
similar and I also wanted to create a failing test to fix.
It's definitely a bit tricky. iirc it was something like this:
var list:XMLList;
list ==
I just made a commit which should do the right thing vis a vis both undefined
and empty strings.
I added a test for the additional case and all existing tests still pass...
> On Jul 4, 2022, at 2:28 PM, Harbs wrote:
>
> It’s because valueOf of XMLList was changed.
>
> For reference, this
It’s because valueOf of XMLList was changed.
For reference, this passed in Flash and fails in JS:
public function emptyStringify():void{
var xml:XML = ;
assertEquals("" + xml.Baz.text(), "","An empty node should return
an empty string");
}
> On Jul 4,
There’s more xml problems.
Coercing empty xml to a string used to result in an empty string. It now
results in “undefined”.
i.e.
var xml:XML = ;
'' + xml.Baz.text()
I believe we used to get “”, and now we get “undefined”.
> On Jun 27, 2022, at 6:44 AM, Greg Dove wrote:
>
> Sorry about
17 matches
Mail list logo