You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by OmPrakash Muppirala <bi...@gmail.com> on 2013/11/11 21:33:02 UTC

[FLEXJS] DataBinding example does not work

Sorry, but I still have not been able to run the FlexJS example projects.

I got the latest overlay zip file (this morning) and set it up as per
instructions.  I am not making any changes to the config tools.

When I compile the DataBindingTest app using the FlexJS (Debug Build) run
config, I am getting this warning:

==============================================================================
Loading configuration:
C:\p\flex_os\workspace\FlexJS\FlexJSSDK\frameworks\flex-config.xml

outputBindingInfoAsData
C:\p\flex_os\workspace\flexroot\git\flex-asjs\examples\DataBindingTest\src\MyInitialView.mxml:131
Warning: Data binding will not be able to detect assignments to 'strings'.

dataProvider="{MyModel(applicationModel).strings}" />

^

78613 bytes written to
C:\p\flex_os\workspace\flexroot\git\flex-asjs\examples\DataBindingTest\bin-debug\DataBindingTest.swf
in 3.193 seconds
==============================================================================

But, it does output the swf file.  When I run it in a browser, I am getting
this RTE:

==============================================================================
TypeError: Error #1007: Instantiation attempted on a non-constructor.
    at org.apache.flex.core::UIBase/get
model()[C:\p\flex_os\workspace\flexroot\git\flex-asjs\frameworks\as\src\org\apache\flex\core\UIBase.as:173]
    at org.apache.flex.html.staticControls::Label/set
width()[C:\p\flex_os\workspace\flexroot\git\flex-asjs\frameworks\as\src\org\apache\flex\html\staticControls\Label.as:61]
    at
org.apache.flex.utils::MXMLDataInterpreter$/generateMXMLArray()[C:\p\flex_os\workspace\flexroot\git\flex-asjs\frameworks\as\src\org\apache\flex\utils\MXMLDataInterpreter.as:135]
    at
org.apache.flex.utils::MXMLDataInterpreter$/generateMXMLInstances()[C:\p\flex_os\workspace\flexroot\git\flex-asjs\frameworks\as\src\org\apache\flex\utils\MXMLDataInterpreter.as:224]
    at
org.apache.flex.utils::MXMLDataInterpreter$/generateMXMLArray()[C:\p\flex_os\workspace\flexroot\git\flex-asjs\frameworks\as\src\org\apache\flex\utils\MXMLDataInterpreter.as:200]
    at
org.apache.flex.utils::MXMLDataInterpreter$/generateMXMLInstances()[C:\p\flex_os\workspace\flexroot\git\flex-asjs\frameworks\as\src\org\apache\flex\utils\MXMLDataInterpreter.as:224]
    at
org.apache.flex.core::ViewBase/addedToParent()[C:\p\flex_os\workspace\flexroot\git\flex-asjs\frameworks\as\src\org\apache\flex\core\ViewBase.as:43]
    at
org.apache.flex.core::Application/addElement()[C:\p\flex_os\workspace\flexroot\git\flex-asjs\frameworks\as\src\org\apache\flex\core\Application.as:131]
    at
org.apache.flex.core::Application/initHandler()[C:\p\flex_os\workspace\flexroot\git\flex-asjs\frameworks\as\src\org\apache\flex\core\Application.as:61]
==============================================================================


UIBase.as line 173 has this [1]:
addBead(new (ValuesManager.valuesImpl.getValue(this, "iBeadModel")) as
IBead);

I opened up the defaults.css [2] file inside FlexJSUI.swc and there is no
entry for an 'iBeadModel' under Label.  The CSS entry for Label looks like
this:

Label

{


        width: 95;

        height: 18;

   IBeadModel: ClassReference("org.apache.flex.html.staticControls.beads.models.TextModel");

   IBeadView: ClassReference("org.apache.flex.html.staticControls.beads.TextFieldView");

        iMeasurementBead:
ClassReference("org.apache.flex.html.staticControls.beads.TextFieldLabelMeasurementBead");

}


Should we be changing 'iBeadModel' to 'IBeadModel' in UIBase.as?

Thanks,
Om

[1]
https://fisheye6.atlassian.com/browse/flex-asjs/frameworks/as/src/org/apache/flex/core/UIBase.as?hb=true
[2]
https://fisheye6.atlassian.com/browse/flex-asjs/frameworks/as/defaults.css?hb=true

Re: [FLEXJS] DataBinding example does not work

Posted by OmPrakash Muppirala <bi...@gmail.com>.
I deleted the whole project and ran everything fresh and the RTE is gone
now.  The problem seems to have been fixed now.

Thanks folks!

Om


On Mon, Nov 11, 2013 at 2:46 PM, OmPrakash Muppirala
<bi...@gmail.com>wrote:

> On Mon, Nov 11, 2013 at 1:44 PM, Alex Harui <ah...@adobe.com> wrote:
>
>>
>>
>> On 11/11/13 12:33 PM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
>>
>> >Sorry, but I still have not been able to run the FlexJS example projects.
>> >
>> >I got the latest overlay zip file (this morning) and set it up as per
>> >instructions.  I am not making any changes to the config tools.
>> >
>> >When I compile the DataBindingTest app using the FlexJS (Debug Build) run
>> >config, I am getting this warning:
>> >
>>
>> >==========================================================================
>> >====
>> >Loading configuration:
>> >C:\p\flex_os\workspace\FlexJS\FlexJSSDK\frameworks\flex-config.xml
>> >
>> >outputBindingInfoAsData
>>
>> >C:\p\flex_os\workspace\flexroot\git\flex-asjs\examples\DataBindingTest\src
>> >\MyInitialView.mxml:131
>> >Warning: Data binding will not be able to detect assignments to
>> 'strings'.
>> >
>> >dataProvider="{MyModel(applicationModel).strings}" />
>> The warning is expected.  You should be seeing that when MXMLC compiles as
>> well.
>>
>> >78613 bytes written to
>>
>> >C:\p\flex_os\workspace\flexroot\git\flex-asjs\examples\DataBindingTest\bin
>> >-debug\DataBindingTest.swf
>> >in 3.193 seconds
>>
>> >==========================================================================
>> >====
>> That looks like a reasonable size.
>> >
>> >But, it does output the swf file.  When I run it in a browser, I am
>> >getting
>> >this RTE:
>> >
>>
>> >==========================================================================
>> >====
>> >TypeError: Error #1007: Instantiation attempted on a non-constructor.
>> >    at org.apache.flex.core::UIBase/get
>> >
>> >Should we be changing 'iBeadModel' to 'IBeadModel' in UIBase.as?
>> No, the compiled results should have it as 'iBeadModel'.  The Compiler
>> says that CSS properties always starts with lower case so it lower cases
>> the first letter automatically.  Not sure if should do that or not, but it
>> should still work.
>>
>
> If the i stands for Interface, then it should be upper case IBeadModel as
> per normal conventions.  Any reason we are using Apple style name
> conventions? ;-)
>
>
>>
>> Probably time to debug into the getValue call and see if any styles are
>> set up or not.
>>
>
> I will do that and let you know what I find.
>
> Thanks,
> Om
>
>
>>
>> -Alex
>>
>>
>

Re: [FLEXJS] DataBinding example does not work

Posted by OmPrakash Muppirala <bi...@gmail.com>.
On Mon, Nov 11, 2013 at 1:44 PM, Alex Harui <ah...@adobe.com> wrote:

>
>
> On 11/11/13 12:33 PM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:
>
> >Sorry, but I still have not been able to run the FlexJS example projects.
> >
> >I got the latest overlay zip file (this morning) and set it up as per
> >instructions.  I am not making any changes to the config tools.
> >
> >When I compile the DataBindingTest app using the FlexJS (Debug Build) run
> >config, I am getting this warning:
> >
> >==========================================================================
> >====
> >Loading configuration:
> >C:\p\flex_os\workspace\FlexJS\FlexJSSDK\frameworks\flex-config.xml
> >
> >outputBindingInfoAsData
> >C:\p\flex_os\workspace\flexroot\git\flex-asjs\examples\DataBindingTest\src
> >\MyInitialView.mxml:131
> >Warning: Data binding will not be able to detect assignments to 'strings'.
> >
> >dataProvider="{MyModel(applicationModel).strings}" />
> The warning is expected.  You should be seeing that when MXMLC compiles as
> well.
>
> >78613 bytes written to
> >C:\p\flex_os\workspace\flexroot\git\flex-asjs\examples\DataBindingTest\bin
> >-debug\DataBindingTest.swf
> >in 3.193 seconds
> >==========================================================================
> >====
> That looks like a reasonable size.
> >
> >But, it does output the swf file.  When I run it in a browser, I am
> >getting
> >this RTE:
> >
> >==========================================================================
> >====
> >TypeError: Error #1007: Instantiation attempted on a non-constructor.
> >    at org.apache.flex.core::UIBase/get
> >
> >Should we be changing 'iBeadModel' to 'IBeadModel' in UIBase.as?
> No, the compiled results should have it as 'iBeadModel'.  The Compiler
> says that CSS properties always starts with lower case so it lower cases
> the first letter automatically.  Not sure if should do that or not, but it
> should still work.
>

If the i stands for Interface, then it should be upper case IBeadModel as
per normal conventions.  Any reason we are using Apple style name
conventions? ;-)


>
> Probably time to debug into the getValue call and see if any styles are
> set up or not.
>

I will do that and let you know what I find.

Thanks,
Om


>
> -Alex
>
>

Re: [FLEXJS] DataBinding example does not work

Posted by Alex Harui <ah...@adobe.com>.

On 11/11/13 12:33 PM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:

>Sorry, but I still have not been able to run the FlexJS example projects.
>
>I got the latest overlay zip file (this morning) and set it up as per
>instructions.  I am not making any changes to the config tools.
>
>When I compile the DataBindingTest app using the FlexJS (Debug Build) run
>config, I am getting this warning:
>
>==========================================================================
>====
>Loading configuration:
>C:\p\flex_os\workspace\FlexJS\FlexJSSDK\frameworks\flex-config.xml
>
>outputBindingInfoAsData
>C:\p\flex_os\workspace\flexroot\git\flex-asjs\examples\DataBindingTest\src
>\MyInitialView.mxml:131
>Warning: Data binding will not be able to detect assignments to 'strings'.
>
>dataProvider="{MyModel(applicationModel).strings}" />
The warning is expected.  You should be seeing that when MXMLC compiles as
well.

>78613 bytes written to
>C:\p\flex_os\workspace\flexroot\git\flex-asjs\examples\DataBindingTest\bin
>-debug\DataBindingTest.swf
>in 3.193 seconds
>==========================================================================
>====
That looks like a reasonable size.
>
>But, it does output the swf file.  When I run it in a browser, I am
>getting
>this RTE:
>
>==========================================================================
>====
>TypeError: Error #1007: Instantiation attempted on a non-constructor.
>    at org.apache.flex.core::UIBase/get
>
>Should we be changing 'iBeadModel' to 'IBeadModel' in UIBase.as?
No, the compiled results should have it as 'iBeadModel'.  The Compiler
says that CSS properties always starts with lower case so it lower cases
the first letter automatically.  Not sure if should do that or not, but it
should still work.

Probably time to debug into the getValue call and see if any styles are
set up or not.  

-Alex


Re: [FLEXJS] DataBinding example does not work

Posted by Peter Ent <pe...@adobe.com>.
I thought the binding issue with this example was fixed - but I'm also
getting it.

I'm not 100% certain of the reason, to be honest, but you want to use
"iBeadModel" in the code and put "IBeadModel" in CSS. I've looked at how
the ValuesManager et al work and I don't see how the lower-case I comes
into play. I keep meaning to ask Alex, but I always forget.

Peter Ent
Flex SDK Team
Adobe Systems


On 11/11/13 3:33 PM, "OmPrakash Muppirala" <bi...@gmail.com> wrote:

>Sorry, but I still have not been able to run the FlexJS example projects.
>
>I got the latest overlay zip file (this morning) and set it up as per
>instructions.  I am not making any changes to the config tools.
>
>When I compile the DataBindingTest app using the FlexJS (Debug Build) run
>config, I am getting this warning:
>
>==========================================================================
>====
>Loading configuration:
>C:\p\flex_os\workspace\FlexJS\FlexJSSDK\frameworks\flex-config.xml
>
>outputBindingInfoAsData
>C:\p\flex_os\workspace\flexroot\git\flex-asjs\examples\DataBindingTest\src
>\MyInitialView.mxml:131
>Warning: Data binding will not be able to detect assignments to 'strings'.
>
>dataProvider="{MyModel(applicationModel).strings}" />
>
>^
>
>78613 bytes written to
>C:\p\flex_os\workspace\flexroot\git\flex-asjs\examples\DataBindingTest\bin
>-debug\DataBindingTest.swf
>in 3.193 seconds
>==========================================================================
>====
>
>But, it does output the swf file.  When I run it in a browser, I am
>getting
>this RTE:
>
>==========================================================================
>====
>TypeError: Error #1007: Instantiation attempted on a non-constructor.
>    at org.apache.flex.core::UIBase/get
>model()[C:\p\flex_os\workspace\flexroot\git\flex-asjs\frameworks\as\src\or
>g\apache\flex\core\UIBase.as:173]
>    at org.apache.flex.html.staticControls::Label/set
>width()[C:\p\flex_os\workspace\flexroot\git\flex-asjs\frameworks\as\src\or
>g\apache\flex\html\staticControls\Label.as:61]
>    at
>org.apache.flex.utils::MXMLDataInterpreter$/generateMXMLArray()[C:\p\flex_
>os\workspace\flexroot\git\flex-asjs\frameworks\as\src\org\apache\flex\util
>s\MXMLDataInterpreter.as:135]
>    at
>org.apache.flex.utils::MXMLDataInterpreter$/generateMXMLInstances()[C:\p\f
>lex_os\workspace\flexroot\git\flex-asjs\frameworks\as\src\org\apache\flex\
>utils\MXMLDataInterpreter.as:224]
>    at
>org.apache.flex.utils::MXMLDataInterpreter$/generateMXMLArray()[C:\p\flex_
>os\workspace\flexroot\git\flex-asjs\frameworks\as\src\org\apache\flex\util
>s\MXMLDataInterpreter.as:200]
>    at
>org.apache.flex.utils::MXMLDataInterpreter$/generateMXMLInstances()[C:\p\f
>lex_os\workspace\flexroot\git\flex-asjs\frameworks\as\src\org\apache\flex\
>utils\MXMLDataInterpreter.as:224]
>    at
>org.apache.flex.core::ViewBase/addedToParent()[C:\p\flex_os\workspace\flex
>root\git\flex-asjs\frameworks\as\src\org\apache\flex\core\ViewBase.as:43]
>    at
>org.apache.flex.core::Application/addElement()[C:\p\flex_os\workspace\flex
>root\git\flex-asjs\frameworks\as\src\org\apache\flex\core\Application.as:1
>31]
>    at
>org.apache.flex.core::Application/initHandler()[C:\p\flex_os\workspace\fle
>xroot\git\flex-asjs\frameworks\as\src\org\apache\flex\core\Application.as:
>61]
>==========================================================================
>====
>
>
>UIBase.as line 173 has this [1]:
>addBead(new (ValuesManager.valuesImpl.getValue(this, "iBeadModel")) as
>IBead);
>
>I opened up the defaults.css [2] file inside FlexJSUI.swc and there is no
>entry for an 'iBeadModel' under Label.  The CSS entry for Label looks like
>this:
>
>Label
>
>{
>
>
>        width: 95;
>
>        height: 18;
>
>   IBeadModel: 
>ClassReference("org.apache.flex.html.staticControls.beads.models.TextModel
>");
>
>   IBeadView: 
>ClassReference("org.apache.flex.html.staticControls.beads.TextFieldView");
>
>        iMeasurementBead:
>ClassReference("org.apache.flex.html.staticControls.beads.TextFieldLabelMe
>asurementBead");
>
>}
>
>
>Should we be changing 'iBeadModel' to 'IBeadModel' in UIBase.as?
>
>Thanks,
>Om
>
>[1]
>https://fisheye6.atlassian.com/browse/flex-asjs/frameworks/as/src/org/apac
>he/flex/core/UIBase.as?hb=true
>[2]
>https://fisheye6.atlassian.com/browse/flex-asjs/frameworks/as/defaults.css
>?hb=true