---Actual.mxml---
<s:Group foo="1">
<fx:Script>
protected var foo:int;
</fx:Script>
</s:Group>
is supposed to be equivalent to
public class Actual extends Group
{
public function Actual()
{
super();
foo = 1;
}
protected var foo:int;
}
and ActionScript allows a constructor to access a protected (or private or
public) instance variable. So I think the fact that Falcon doesn't allow this
MXML is a bug.
- Gordon
-----Original Message-----
From: Alex Harui [mailto:[email protected]]
Sent: Wednesday, September 25, 2013 12:11 PM
To: [email protected]
Subject: [FALCON] MXML protected vars as attributes
@Gordon (mostly):
I ran into a situation where someone is setting protected variables via MXML
attributes. Is this "allowed"? I thought MXML attributes were only for public
properties. MXMLC lets this happen. Falcon does in one case, but not another.
What should Falcon do?
MXMLC and Falcon allows:
---Base.mxml---
<s:Group>
<fx:Script>
protected var foo:int;
</fx:Script>
</s:Group>
---Actual.mxml---
<Base foo="1" />
MXMLC allows, but Falcon doesn't like:
---Actual.mxml---
<s:Group foo="1">
<fx:Script>
protected var foo:int;
</fx:Script>
</s:Group>
IOW, Falcon is ok with seeing protected vars on the base class but not new
protected vars on the actual class.
Thanks,
-Alex