Alex's fix for DataGridColumn is correct and that build should do it. The DataGrid in AS now cross-compiles to a working DataGrid in JavaScript. There are some small differences in event handling that I will try to work out as things go on (or someone else can if they want to help). But this was a good experience. For example, I had hand-written the JavaScript DataGrid at first so I could compare the cross-compiled DataGrid JavaScript with my version. They were very close, but I saw some small differences, especially with getter/setter code, that didn't cross-compile correctly. I changed the ActionScript code just a little bit and that corrected the JavaScript side.
Here's an example. If I had the ActionScript code as: var label:String = columns[I].label; The JavaScript code that got generated was identical: var label /*:String*/ = columns[I].label; Unfortunately, it should have been columns[I].get_label() in JavaScript. So in ActionScript I just assigned columns[I] to a typed var and then accessed the label property. The cross-compiled code then reflected that using the get_label() function. Something to watch out for when doing this. More and more, the JavaScript code is mimicking the ActionScript code, but using "hand written" lower-level JavaScript classes. For instance, the Label component is specifically written for each language, but now higher-level, composite components, can use those to build upon. Peter Ent Adobe Systems On 1/28/14 6:21 PM, "Alex Harui" <aha...@adobe.com> wrote: >OK, the FlexJSJX.swc wasn't getting into the binary kit. I just pushed >changes for that. > >Peter check in some stuff and I think tried to move DataGridColumn from >FlexJSUI to FlexJSJX and somehow it didn't get in. I put in my working >copy's DataGridColumn into FlexJSJX for now. This may mean that the >DataGrid may be broken. We'll have to wait to see until Peter gets back >on it. > >Wait a bit for Jenkins to build a new nightly before trying it out. No >changes were needed to the installer. >-Alex > >On 1/28/14 11:18 AM, "OmPrakash Muppirala" <bigosma...@gmail.com> wrote: > >>On Tue, Jan 28, 2014 at 11:08 AM, Alex Harui <aha...@adobe.com> wrote: >> >>> >>> >>> On 1/28/14 11:01 AM, "OmPrakash Muppirala" <bigosma...@gmail.com> >>>wrote: >>> >>> >Dont we need this swc when building apps with FlexJS? For example, >>>the >>> >DataGridExample at flex-asjs\examples\DataGridExample does not work >>>now >>> >because it cannot find the basic:DataGrid component implementation. >>> Even the AS version doesn't compile? >> >> >>Yes, FB complains about it as well as the FlexJS debug compile. This is >>the error from FlexJS: >> >>C:\p\flex_os\workspace\flexroot\git\flex-asjs\examples\DataGridExample\sr >>c >>\MyInitialView.mxml:37 >>Error: This tag is unexpected. It will be ignored. >> <basic:DataGrid id="dataGrid" x="20" y="30" width="400" height="300" >>change="dataGridChange()" > >> >> >>> I'll check. I did find the JS >>> version wasn't compiling because the libs folder wasn't in the compiler >>> options. I'll be checking that in today. >>> > >>> >I looked inside the FlexJS sdk installed via the new installer. There >>>is >>> >no FlexJSJX.swc under frameworks/as/libs. Is this intentional? >>> Thanks for catching that. I'll fix that too. >>> > >>> >Thanks, >>> >Om >>> > >>> > >>> >On Thu, Jan 23, 2014 at 11:18 AM, Alex Harui <aha...@adobe.com> wrote: >>> > >>> >> As you may recall, Peter was able to create JS version of DataGrid >>>and >>> >> BarChart by writing the AS version and cross-compiling it to JS. >>> >> >>> >> I just checked in a new swc called FlexJSJX and changes to the build >>> >> scripts so those components and others can have their AS classes in >>>that >>> >> project and their JS versions will be cross-compiled via the >>>FalconJX >>> >> version of COMPC. >>> >> >>> >> So, if you are building out a new component for FlexJS, if the JS >>> >>version >>> >> can be completely auto-generated by FalconJX, add the component to >>> >> FlexJSJX, otherwise add the AS code to FlexJSUI.swc and your >>> >> manually-written JS code to the frameworks/js/FlexJS folder. >>> >> >>> >> Thanks, >>> >> >>> >> -Alex >>> >> >>> >> >>> >>> >