Hi Alex,
This is what I have done,
Created MyLibrary as a Flex Library Project, Having
MyLibrary
|_src
|_components
|_MyTextInput extends org.apache.flex.html5.TextInput; (only
has a constructor with call to super)
Following is log after compiling by using Menu run -> ExternalTools -> flexJs
(JS COMPC)
using FlashBuilder Project Files
FlashBuilder settings:
-locale
@locale@
-source-path+=D:\eclipse_workspace\flexJsWS\MyLibrary/src
-output=D:\eclipse_workspace\flexJsWS\MyLibrary/bin/MyLibrary.swc
-include-sources=D:\eclipse_workspace\flexJsWS\MyLibrary/src
-js-output-type=FLEXJS
-sdk-js-lib=D:\software\apache-flex-flexjs-0.0.2-jBurg\js\bin\..\..\frameworks\js\FlexJS\src
-fb
Compiling file:
D:\eclipse_workspace\flexJsWS\MyLibrary\bin\components\MyTextInput.js
Copied swc file and components package which has MyTextInput.js class inside it
to DataBindingTest/libs folder
So following is how the DataBindingTest projects looks now,
DataBindingTest(Displaying only changed structure as everything else is same)
|_libs
|_components
|_MyTextInput.js
|_MyLibrary.swc
Changed MyinitialView.mxml to use custom components:MyTextInput instead of
basic:TextInput having id as "symbolTI"
After compiling it against FlexJs (FlaconJx Debug and Release Build) following
is error log I received,
using FlashBuilder Project Files
FlashBuilder settings:
-locale
en_US
-source-path+=D:\eclipse_workspace\flexJsWS\DataBindingTest/src
-compiler.accessible=true
-output=D:\eclipse_workspace\flexJsWS\DataBindingTest/bin-release/DataBindingTest.swf
-library-path+=D:\eclipse_workspace\flexJsWS\DataBindingTest/libs
-js-output-type=FLEXJS
-sdk-js-lib=D:\software\apache-flex-flexjs-0.0.2-jBurg\js\bin\..\..\frameworks\js\FlexJS\src
-fb
D:\eclipse_workspace\flexJsWS\DataBindingTest/src/DataBindingTest.mxml
Compiling file:
D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\DataBindingTest.js
Compiling file:
D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\StockDataJSONItemConverter.js
Compiling file:
D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\MyInitialView.js
Compiling file:
D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\models\MyModel.js
Compiling file:
D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\controllers\MyController.js
Could not find file for class: components.MyTextInput
java.io.FileNotFoundException:
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at
org.apache.flex.compiler.internal.graph.GoogDepsWriter.getDirectDependencies(GoogDepsWriter.java:319)
at
org.apache.flex.compiler.internal.graph.GoogDepsWriter.addDeps(GoogDepsWriter.java:149)
at
org.apache.flex.compiler.internal.graph.GoogDepsWriter.addDeps(GoogDepsWriter.java:164)
at
org.apache.flex.compiler.internal.graph.GoogDepsWriter.addDeps(GoogDepsWriter.java:164)
at
org.apache.flex.compiler.internal.graph.GoogDepsWriter.buildDB(GoogDepsWriter.java:103)
at
org.apache.flex.compiler.internal.graph.GoogDepsWriter.generateDeps(GoogDepsWriter.java:73)
at
org.apache.flex.compiler.internal.codegen.mxml.flexjs.MXMLFlexJSPublisher.publish(MXMLFlexJSPublisher.java:191)
at org.apache.flex.compiler.clients.MXMLJSC.compile(MXMLJSC.java:427)
at
org.apache.flex.compiler.clients.MXMLJSC._mainNoExit(MXMLJSC.java:262)
at org.apache.flex.compiler.clients.MXMLJSC.mainNoExit(MXMLJSC.java:220)
at org.apache.flex.compiler.clients.MXMLJSC.main(MXMLJSC.java:182)
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\DataBindingTest.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\utils\EffectTimer.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\IEffectTimer.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\events\IEventDispatcher.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\ValuesManager.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\IValuesImpl.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\events\EventDispatcher.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\events\ValueEvent.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\SimpleStatesImpl.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\mx\states\AddItems.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\IDocument.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\mx\states\SetProperty.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\mx\states\State.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\IBead.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\IStatesImpl.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\IStrand.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\UIBase.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\HTMLElementWrapper.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\IBeadModel.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\utils\Language.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\IBeadController.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\IBeadLayout.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\IBeadView.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\IUIBase.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\html\beads\DataItemRendererFactoryForArrayData.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\IDataProviderItemRendererMapper.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\html\beads\ListView.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\IItemRendererParent.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\ILayoutParent.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\html\beads\IListView.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\html\beads\TextItemRendererFactoryForArrayData.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\IItemRenderer.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\html\beads\models\ArraySelectionModel.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\ISelectionModel.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\html\supportClasses\NonVirtualDataGroup.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\html\supportClasses\DataItemRenderer.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\html\beads\controllers\ItemRendererMouseController.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\html\supportClasses\UIItemRendererBase.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\IItemRendererFactory.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\events\Event.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\html\supportClasses\ButtonBarButtonItemRenderer.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\html\beads\layouts\NonVirtualVerticalScrollingLayout.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\html\beads\controllers\ListSingleSelectionMouseController.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\ItemRendererClassFactory.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\mx\core\ClassFactory.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\mx\core\IFactory.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\IItemRendererClassFactory.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\html\supportClasses\StringItemRenderer.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\Application.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\SimpleValuesImpl.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\utils\MXMLDataInterpreter.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\SimpleCSSValuesImpl.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\MyInitialView.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\ViewBase.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\IPopUpHost.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\IParent.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\events\ValueChangeEvent.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\html\TextArea.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\html\Label.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\ViewBaseDataBinding.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\binding\ConstantBinding.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\binding\BindingBase.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\binding\GenericBinding.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\binding\PropertyWatcher.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\binding\WatcherBase.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\binding\SimpleBinding.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\html\Container.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\ContainerBase.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\IContainer.js'
Dependencies calculated for ''
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\html\TextButton.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\html\Button.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\html\beads\layouts\NonVirtualVerticalLayout.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\html\DropDownList.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\core\ListBase.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\html\RadioButton.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\html\CheckBox.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\html\beads\layouts\NonVirtualHorizontalLayout.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\events\CustomEvent.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\models\MyModel.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\controllers\MyController.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\net\HTTPService.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\net\HTTPHeader.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\net\dataConverters\LazyCollection.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\net\JSONInputParser.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\StockDataJSONItemConverter.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\net\JSONItemConverter.js'
Dependencies calculated for
'D:\eclipse_workspace\flexJsWS\DataBindingTest\bin\js-debug\org\apache\flex\utils\ViewSourceContextMenuOption.js'
Nov 05, 2014 11:26:33 AM com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: ERROR - Cannot read: C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64
Bit)
Nov 05, 2014 11:26:34 AM com.google.javascript.jscomp.LoggerErrorManager
printSummary
WARNING: 1 error(s), 0 warning(s)
Error message: JSC_READ_ERROR. Cannot read: C:\Program Files\Adobe\Adobe Flash
Builder 4.7 (64 Bit) at (unknown source) line (unknown line) : (unknown column)
File not found: components.MyTextInput
D:\eclipse_workspace\flexJsWS\DataBindingTest\src\MyInitialView.mxml:131
Data binding will not be able to detect assignments to 'strings'.
dataProvider="{MyModel(applicationModel).strings}" />
--------
If I directly refer MyLibrary project in DataBindingTest project by adding it
to FlexBuildPath --> AddProject
I receive following error message
using FlashBuilder Project Files
FlashBuilder settings:
-locale
en_US
-source-path+=D:\eclipse_workspace\flexJsWS\DataBindingTest/src
-compiler.accessible=true
-output=D:\eclipse_workspace\flexJsWS\DataBindingTest/bin-release/DataBindingTest.swf
-library-path+=D:\eclipse_workspace\flexJsWS/MyLibrary/bin/MyLibrary.swc
-library-path+=D:\eclipse_workspace\flexJsWS\DataBindingTest//MyLibrary/bin/MyLibrary.swc
-js-output-type=FLEXJS
-sdk-js-lib=D:\software\apache-flex-flexjs-0.0.2-jBurg\js\bin\..\..\frameworks\js\FlexJS\src
-fb
D:\eclipse_workspace\flexJsWS\DataBindingTest/src/DataBindingTest.mxml
command line
unable to open
'D:\eclipse_workspace\flexJsWS\DataBindingTest\MyLibrary\bin\MyLibrary.swc'.
---------------
I have tried different approach by keeping components.MyTextInput.js in
DataBindingTest/src folder as well but didn’t succeeded.
I was doing POC for FlexJs to show this to manager if there is any alternate
approach by doing manual changes it will work for me for this moment.
P.S: Above approach of custom components works fine for swf version with FlexJs
sdk.
-----Original Message-----
From: Alex Harui [mailto:[email protected]]
Sent: Tuesday, November 04, 2014 8:54 PM
To: [email protected]
Subject: Re: [FlexJS] Flex Library Project
On 11/4/14, 4:31 AM, "Raj U. Shaikh" <[email protected]> wrote:
>Hi Team,
>I have downloaded "apache-flex-flexjs-0.0.2-jBurg" and able to execute
>simple projects similar to "DataBindingTest" example.
>However, I am not able to achieve same thing by following technique,
>
>
>1. Created a flex library project named MyLibrary and compiled it
>using Run -> FlexJS (JS COMPC)
>
>2. This library project is referred in DataBindingTest project by
>using Flex Build Path -> Add Project
>
>3. I can able to use custom components from MyLibrary project in
>DataBindingTest project.
>
>4. When compiled in swf format it works fine.
>
>5. But when I try to compile it through FlexJs (FalconJX Debug and
>Release Build) I am getting error at compile time that unable to open
>'D:\eclipse_workspace\flexJsWS\ DataBindingTest
>\MyLibrary\bin\MyLibrary.swc'.
>
>6. Also I tried to coping MyLibrary.swc and its js equivalent
>source code to DataBindingTest\js but no luck.
>
>Is this an irrelevant approach in JS? Or is it a defect?
We haven’t done too much testing with user-developed SWCs so it could be a bug
or config issue. Can you post the console output of the compile?
Where is the SWC and JS located on your computer?
Thanks,
-Alex
MASTEK LTD.
In the US, we're called MAJESCOMASTEK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of
Mastek Limited, unless specifically indicated to that effect. Mastek Limited
does not accept any responsibility or liability for it. This e-mail and
attachments (if any) transmitted with it are confidential and/or privileged and
solely for the use of the intended person or entity to which it is addressed.
Any review, re-transmission, dissemination or other use of or taking of any
action in reliance upon this information by persons or entities other than the
intended recipient is prohibited. This e-mail and its attachments have been
scanned for the presence of computer viruses. It is the responsibility of the
recipient to run the virus check on e-mails and attachments before opening
them. If you have received this e-mail in error, kindly delete this e-mail from
desktop and server.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~