royale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yishay Weiss <yishayj...@hotmail.com>
Subject MXML attributes, minification, and initialization
Date Mon, 04 Dec 2017 11:30:58 GMT
We ran into an interesting problem with minification. If you have a component with an attribute
that’s initialized like this:

public var myProp:Boolean = false;

and you try to initialize it from mxml (<comp myProp=”true”/>) the result will be
myComp == true in debug and myComp == false in release.

We found 2 ways around that: either don’t initialize (public var myProp:Boolean) or use
get/set methods instead.

I’m not sure what’s going on there but it’s something to watch out for.


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message