Michael Schmalle created FLEX-34866:
---------------------------------------
Summary: Constructors need field intialization of scalar values
Key: FLEX-34866
URL: https://issues.apache.org/jira/browse/FLEX-34866
Project: Apache Flex
Issue Type: Bug
Components: FalconJX
Affects Versions: Apache FalconJX 0.0.1
Reporter: Michael Schmalle
Assignee: Michael Schmalle
Priority: Critical
>From the dev list;
>So what are all the scalar values in AS?
String, Int, Number, Uint, Boolean. IIRC, it is anything you don’t “new”.
[] is effectively “new Array”, {} is effectively “new Object”. And String
is in the list only because there is no in-place String modifiers. And
you can’t just watch out for “new” as there can be static generators.
private var foo:SomeInstance = SomeSingleton.SomeInstanceFactory;
>
>I have to code to add this into the emitter when the time comes, so we
>need
>the prototype declaration but we also need to initalize files that
>initalize any value correct?
IIRC, in Flex in AS2 (not AS3) the convention was to declare all
variables/properties on the prototype, and initialize scalars on the
prototype and write code to initialize instance values in the constructor.
But feel free to do something else if it is easier.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)