'OK with me.  I didn't realize that 'delete' returned a value.'

Neither did I until I found a Flex class overriding it and it forced me to
check it.
I tested it quickly in browser and it also behaves the same as flash for
when you try to delete non 'ownProperty' (i.e. prototype) members.

So you can use
 delete myObject.constructor
in both js and flash, and in both cases it returns Boolean true, but in
both cases it also obviously does not delete the constructor field from the
instance's prototype. So I am not sure why it returns true in those cases,
but at least it is consistent.

Thanks for the sanity check .... I'll make the change later today.

On Thu, Feb 27, 2020 at 11:04 AM Alex Harui <[email protected]>
wrote:

> OK with me.  I didn't realize that 'delete' returned a value.
>
> On 2/26/20, 1:53 PM, "Greg Dove" <[email protected]> wrote:
>
>     Quick check, does anyone have objections to aligning the Proxy
>     deleteProperty method signature with swf?
>
>     It should be:
>     Returns
>     Boolean
>     <
> https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fhelp.adobe.com%2Fen_US%2FFlashPlatform%2Freference%2Factionscript%2F3%2FBoolean.html&amp;data=02%7C01%7Caharui%40adobe.com%7C87c8cdbde1054e11a8ff08d7bb065431%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637183508178279239&amp;sdata=O1XnoZuG6wT8Wsk54BxvjjlOIwivM0w3INfsf%2FGWLn4%3D&amp;reserved=0
> >
>     —
>     If the property was deleted, true; otherwise false.
>     At the moment it is :void in js and (as expected) returns Boolean as
> above
>     in swf.
>
>     I hit this in some porting code recently and I'd like to address it.
>     The change would simply be to do the following:
>
>     public function deleteProperty(propName:String):Boolean
>     {
>        return delete valueMap[propName];
>     }
>
>     Which essentially makes it the same as swf (but in public namespace
> instead
>     of flash_proxy). It only needs a few small changes in the subclasses in
>     MXRoyale for JS to match.
>
>     Any issues with me making that change? (I don't expect there should be)
>
>
>

Reply via email to