On Mon, Feb 3, 2014 at 4:47 PM, Alex Harui <aha...@adobe.com> wrote: > > > On 2/3/14 4:31 PM, "OmPrakash Muppirala" <bigosma...@gmail.com> wrote: > > >On Mon, Feb 3, 2014 at 3:43 PM, Alex Harui <aha...@adobe.com> wrote: > > > >> The correct behavior is for the itemRenderer to have an instance of > >> ClassFactory (which should have a newInstance method as your source code > >> indicated) and not the class ClassFactory which would not have > >>newInstance > >> on it since newInstance isn't static. > >> > >> If itemRenderer is an instance of ClassFactory but doesn't have a > >> newInstance method then something is still wrong with your setup. > >> > >> > >Wrong with the example app or wrong with my flex-asjs setup? I have a > >clean > >flex-asjs repo in sync with git. > >What is the correct way to build the FlexJSJX, etc. swc files? > I don't know where things are going wrong. The code is behaving like the > compiler saw an out of date definition for BarChartSeries. Maybe a stale > copy is in your lib path or maybe stale source in a source path, I don't > know. Or FB is caching something it shouldn't. > > Try this: In examples/BarChartExample, don't use FB, instead run ant and > then run the SWF in bin-debug. It came up for me. Do you still get an > error? > > Okay, skipping FB completely. Exited FB, deleted bin and bin-debug folders. Ran ant in examples/BarChartExample folder. Opened BarChartExample.html in IE10, same exact error as before.
Have you been able to run the app in a machine other than yours? Any chance you can test that? Or can anyone else on the dev list try this out? It would be good to know if this is a real problem or if something is wrong with my setup. Thanks, Om > > > > > >> BTW, I assume you've done a "clean" on the project from FB? > >> > >> > >Yes, multiple times :-) > > > > > >> -Alex > >> > >> On 2/3/14 3:33 PM, "OmPrakash Muppirala" <bigosma...@gmail.com> wrote: > >> > >> >On Mon, Feb 3, 2014 at 2:10 PM, Alex Harui <aha...@adobe.com> wrote: > >> > > >> >> I think the issue is that the series itemRenderer may be set to > >>actual > >> >> ClassFactory class instead of an instance of ClassFactory. > >> >> > >> >> Can you check that in the debugger? > >> >> > >> >> > >> >You are right, the method MXMLDataInterpreter.generateMXMLArray() > >>passes > >> >an > >> >instance of type mx.core.ClassFactory to BarChartSeries.itemRenderer. > >>No > >> >error at this point, rather when itemRenderer.newInstance() is called, > >>the > >> >error is thrown. > >> > > >> > > >> >> Make sure that you don't have stale duplicates of classes like > >> >> BarChartSeries and IChartSeries. The itemRenderer property should > >>be of > >> >> type Ifactory unless it is stale. > >> >> > >> > > >> >BarChartSeries and IChartSeries look good to me. In the FlexJSJX > >>project, > >> >org.apache.flex.charts.supportClasses has these methods: > >> > private var _itemRenderer:IFactory; > >> > public function get itemRenderer():IFactory > >> > { > >> > return _itemRenderer; > >> > } > >> > public function set itemRenderer(value:IFactory):void > >> > { > >> > _itemRenderer = value; > >> > } > >> > > >> >Thanks, > >> >Om > >> > > >> > > >> >> > >> >> -Alex > >> >> > >> >> On 2/3/14 12:36 PM, "OmPrakash Muppirala" <bigosma...@gmail.com> > >>wrote: > >> >> > >> >> >On Mon, Feb 3, 2014 at 12:32 PM, OmPrakash Muppirala > >> >> ><bigosma...@gmail.com>wrote: > >> >> > > >> >> >> On Mon, Feb 3, 2014 at 12:16 PM, Alex Harui <aha...@adobe.com> > >> wrote: > >> >> >> > >> >> >>> Does your copy of ClassFactory (in FlexJSUI/src/mx/core) have a > >> >> >>> newInstance method? > >> >> >>> > >> >> >> > >> >> >> Yes, it does. > >> >> >> > >> >> >> > >> >> >>> > >> >> >>> Did you shutdown and re-start FB? I think it caches SWC and > >>locks > >> >> >>>them on > >> >> >>> the disk. > >> >> >>> > >> >> >> > >> >> >> Tried shutting down FB, copying over the files again and restarted > >> >>FB. > >> >> >> Same result when I compile the app with FlexJS Debug build tool. > >> >> >> > >> >> >> > >> >> >>> > >> >> >>> Check a link-report and see which version of ClassFactory is > >>being > >> >> >>>pulled > >> >> >>> in. > >> >> >>> > >> >> >> > >> >> >> This is what I see in the linkreport.xml entry for > >> >>mx.core:ClassFactory: > >> >> >> > >> >> >> <script > >> >> >> > >> >> > >> > >>>>>>name="C:\p\flex_os\workspace\FlexJS\FlexJSSDK_ViaInstaller\frameworks > >>>>>>\a > >> >>>>s\ > >> >> >>libs\MXMLCClasses.swc(mx.core:ClassFactory)" > >> >> >> mod="1390855527301" size="410" optimizedsize="190"> > >> >> >> <def id="mx.core:ClassFactory" /> > >> >> >> <pre id="mx.core:IFactory" /> > >> >> >> <pre id="Object" /> > >> >> >> <dep id="Class" /> > >> >> >> </script> > >> >> >> > >> >> >> Looks okay? > >> >> >> > >> >> > > >> >> >Note: I was not able to add the -link-report=linkreport.xml > >>addition > >> >>to > >> >> >the FlexJS Debug tool config. It seems to confuse the compiler. > >> >> > > >> >> >I had to add the link report compiler option by going into Project > > >> >> >Properties > Flex Compiler > Additional Compiler Arguments. > >> >> > > >> >> >Not sure if this makes a difference. > >> >> > > >> >> > > >> >> > > >> >> >> > >> >> >> > >> >> >>> > >> >> >>> -Alex > >> >> >>> > >> >> >>> On 2/3/14 11:23 AM, "OmPrakash Muppirala" <bigosma...@gmail.com> > >> >> wrote: > >> >> >>> > >> >> >>> >I made some changes to the FlexJSJX classes and tried to use > >>that > >> >> >>>with my > >> >> >>> >exisisting FlexJS SDK. Here is what I am doing: > >> >> >>> > > >> >> >>> >1. In the \flex-asjs\frameworks\as folder, run ant. The > >>following > >> >> >>>swc > >> >> >>> >files: FlexJSJX, FlexJSUI and MXMLCClasses get created under > >> >> >>> >\flex-asjs\frameworks\as\libs folder. > >> >> >>> >2. Copy these swc files to the > >> >> >>> >"FlexJSSDK_ViaInstaller\frameworks\as\libs" > >> >> >>> >folder > >> >> >>> >3. Refresh FB project and compile the BarChartExample app with > >>the > >> >> >>> >"FlexJS > >> >> >>> >(Debug Build)" tool > >> >> >>> > > >> >> >>> >This is the error message I am seeing. Note that I dont see > >>such > >> >> >>>errors > >> >> >>> >when I run with the installed SDK's swc files. > >> >> >>> > > >> >> >>> >Also, I see a file size difference between the ones that came > >>with > >> >>the > >> >> >>> >installer vs. the ones that I built. > >> >> >>> > > >> >> >>> >I have a feeling this could be related to the flash > >>playerversion > >> >> >>>value, > >> >> >>> >could it be? I selected 11.9 during the installation process. > >> >>Does > >> >> >>>this > >> >> >>> >matter? > >> >> >>> > > >> >> >>> >Or is it possible that there are some uncommitted files that was > >> >>used > >> >> >>>to > >> >> >>> >build the FlexJS binaries. > >> >> >>> > > >> >> >>> >ReferenceError: Error #1069: Property > >>mx.core:IFactory::newInstance > >> >> >>>not > >> >> >>> >found on mx.core.ClassFactory and there is no default value. > >> >> >>> > at > >>org.apache.flex.charts.beads::ChartItemRendererFactory/set > >> >> >>> > >> >> >>> > >> >> > >> > >>>>>>>>strand()[C:\p\flex_os\workspace\flexroot\git\flex-asjs\frameworks\a > >>>>>>>>s\ > >> >>>>>>pr > >> >> >>>>oje > >> >> >>> > >> >> >>> > >> >> > >> > >>>>>>>>cts\FlexJSJX\src\org\apache\flex\charts\beads\ChartItemRendererFact > >>>>>>>>or > >> >>>>>>y. > >> >> >>>>as: > >> >> >>> >76] > >> >> >>> > at > >> >> >>> > >> >> >>> > >> >> > >> > >>>>>>>>org.apache.flex.core::UIBase/addBead()[C:\p\flex_os\workspace\flexr > >>>>>>>>oo > >> >>>>>>t\ > >> >> >>>>git > >> >> >>> > >> >> >>> > >> >> > >> > >>>>>>>>\flex-asjs\frameworks\as\projects\FlexJSUI\src\org\apache\flex\core > >>>>>>>>\U > >> >>>>>>IB > >> >> >>>>ase > >> >> >>> >.as:231] > >> >> >>> > at > >> >> >>> > >> >> >>> > >> >> > >> > >>>>>>>>org.apache.flex.html.staticControls::List/addedToParent()[C:\p\flex > >>>>>>>>_o > >> >>>>>>s\ > >> >> >>>>wor > >> >> >>> > >> >> >>> > >> >> > >> > >>>>>>>>kspace\flexroot\git\flex-asjs\frameworks\as\projects\FlexJSUI\src\o > >>>>>>>>rg > >> >>>>>>\a > >> >> >>>>pac > >> >> >>> >he\flex\html\staticControls\List.as:107] > >> >> >>> > at > >> >> >>> > >> >> >>> > >> >> > >> > >>>>>>>>org.apache.flex.core::UIBase/addElement()[C:\p\flex_os\workspace\fl > >>>>>>>>ex > >> >>>>>>ro > >> >> >>>>ot\ > >> >> >>> > >> >> >>> > >> >> > >> > >>>>>>>>git\flex-asjs\frameworks\as\projects\FlexJSUI\src\org\apache\flex\c > >>>>>>>>or > >> >>>>>>e\ > >> >> >>>>UIB > >> >> >>> >ase.as:268] > >> >> >>> > at > >> >> >>> > >> >> >>> > >> >> > >> > >>>>>>>>org.apache.flex.utils::MXMLDataInterpreter$/generateMXMLArray()[C:\ > >>>>>>>>p\ > >> >>>>>>fl > >> >> >>>>ex_ > >> >> >>> > >> >> >>> > >> >> > >> > >>>>>>>>os\workspace\flexroot\git\flex-asjs\frameworks\as\projects\FlexJSUI > >>>>>>>>\s > >> >>>>>>rc > >> >> >>>>\or > >> >> >>> >g\apache\flex\utils\MXMLDataInterpreter.as:192] > >> >> >>> > at > >> >> >>> > >> >> >>> > >> >> > >> > >>>>>>>>org.apache.flex.utils::MXMLDataInterpreter$/generateMXMLInstances() > >>>>>>>>[C > >> >>>>>>:\ > >> >> >>>>p\f > >> >> >>> > >> >> >>> > >> >> > >> > >>>>>>>>lex_os\workspace\flexroot\git\flex-asjs\frameworks\as\projects\Flex > >>>>>>>>JS > >> >>>>>>UI > >> >> >>>>\sr > >> >> >>> >c\org\apache\flex\utils\MXMLDataInterpreter.as:224] > >> >> >>> > at > >> >> >>> > >> >> >>> > >> >> > >> > >>>>>>>>org.apache.flex.core::ViewBase/addedToParent()[C:\p\flex_os\workspa > >>>>>>>>ce > >> >>>>>>\f > >> >> >>>>lex > >> >> >>> > >> >> >>> > >> >> > >> > >>>>>>>>root\git\flex-asjs\frameworks\as\projects\FlexJSUI\src\org\apache\f > >>>>>>>>le > >> >>>>>>x\ > >> >> >>>>cor > >> >> >>> >e\ViewBase.as:43] > >> >> >>> > at > >> >> >>> > >> >> >>> > >> >> > >> > >>>>>>>>org.apache.flex.core::Application/addElement()[C:\p\flex_os\workspa > >>>>>>>>ce > >> >>>>>>\f > >> >> >>>>lex > >> >> >>> > >> >> >>> > >> >> > >> > >>>>>>>>root\git\flex-asjs\frameworks\as\projects\FlexJSUI\src\org\apache\f > >>>>>>>>le > >> >>>>>>x\ > >> >> >>>>cor > >> >> >>> >e\Application.as:289] > >> >> >>> > at > >> >> >>> > >> >> >>> > >> >> > >> > >>>>>>>>org.apache.flex.core::Application/initHandler()[C:\p\flex_os\worksp > >>>>>>>>ac > >> >>>>>>e\ > >> >> >>>>fle > >> >> >>> > >> >> >>> > >> >> > >> > >>>>>>>>xroot\git\flex-asjs\frameworks\as\projects\FlexJSUI\src\org\apache\ > >>>>>>>>fl > >> >>>>>>ex > >> >> >>>>\co > >> >> >>> >re\Application.as:101] > >> >> >>> > > >> >> >>> > > >> >> >>> >Thanks, > >> >> >>> >Om > >> >> >>> > >> >> >>> > >> >> >> > >> >> > >> >> > >> > >> > >