-Alex
*From: *Serkan Taş <[email protected]>
*Reply-To: *"[email protected]" <[email protected]>
*Date: *Monday, December 10, 2018 at 11:51 AM
*To: *"[email protected]" <[email protected]>
*Subject: *Re: Work on Emulation
Hi Alex,
The Js output is generated from the sources with nested "excludeFrom"
removed. It is not pushed to git interms of sources.
Here is the latest part of source which the js output is generated from :
<!--RO:s:Group id="mainApp" width="100%" height="100%"
excludeFrom="loggedOutState, dummyState"-->
<s:Group id="mainApp" width="100%" height="100%">
<s:layout>
<s:HorizontalLayout clipAndEnableScrolling="true"
paddingRight="0" paddingLeft="0" paddingTop="10" paddingBottom="10" />
</s:layout>
<comps:TreePanel height="100%" id="jobTree" left="0"
right="10" top="0" bottom="0" />
<s:Group width="100%" height="100%">
<s:layout>
<s:VerticalLayout clipAndEnableScrolling="true"
paddingRight="0" paddingLeft="0" paddingTop="10" paddingBottom="10" />
</s:layout>
<comps:MenuBar id="menuBar"/>
<s:Panel id="messagePanel" title="" width="100%"
height="55" visible="false" includeInLayout="false">
<mx:Text id="messageText" text="" textAlign="center"
color="0xFF2D00" width="100%" />
</s:Panel>
<!--RO:
<s:BitmapImage source="@Embed('/images/likya.jpg')"
left="0" right="0" top="0" bottom="0" scaleMode="stretch"
includeIn="anaSayfaState" />
-->
<!--mx:SWFLoader width="950" height="500"
source="http://www.youtube.com/v/ojASzi1Kb8c"
<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.youtube.com%2Fv%2FojASzi1Kb8c&data=02%7C01%7Caharui%40adobe.com%7C6326594052774917d96908d65ed8d54a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636800682721435809&sdata=3IdwNwCAkVJ85azCRQO16GCllN3f%2F%2F8g%2FL8e7ORynTE%3D&reserved=0>
includeIn="loggedInState"/-->
<!--comps:MainPanel includeIn="jobListState" height="100%"/-->
<jobdetail:JobListWithDetails height="100%"
excludeFrom="anaSayfaState, jobDetailState" id="jobListDetail"/>
<jobdetail:JobAllDetailPanel includeIn="jobDetailState"
id="allJobDetail" height="100%"/>
</s:Group>
</s:Group>
I have checked and corrected all the nested exclude/include references
before posting the mail.
For the other exception, I am glad to hear that I helped for finding
the bug. I have two questions :
1. " it appears you are using an unconventional setup and it took me
quite a while to find this because I am using one of the standard
setups."
I am using the setup that Greg has send me the build files,
combination of ant and maven. I thought this is okay for you and the
rest of the list. If not than - may be it is the second time or more -
may you please give advises for the "standard" setup ?
2. May you please share where I can look the changes you made to fix
"the bug in maven build" ?
Thanks,
Serkan
10.12.2018 10:35 tarihinde Alex Harui yazdı:
Hi Serkan,
For consistency, please refer to JS files as output, not source.
The source is ActionScript and MXML.
The exception with States is still about nested states. The
JobListWithDetails is excludedFrom loggedOutState and is in a
Group with excludeFrom loggedOutState. I recommend scanning for
includeIn and excludeFrom and then checking the children of any
container to see if there is duplicate states used in the children
of that container.
The other exception is because of a bug in the Maven build. I
just pushed a change for that. It is great that you happened to
help us find this bug, but again, it appears you are using an
unconventional setup and it took me quite a while to find this
because I am using one of the standard setups.
Thanks,
-Alex
*From: *Serkan Taş <[email protected]>
<mailto:[email protected]>
*Reply-To: *"[email protected]"
<mailto:[email protected]> <[email protected]>
<mailto:[email protected]>
*Date: *Sunday, December 9, 2018 at 3:45 AM
*To: *"[email protected]" <mailto:[email protected]>
<[email protected]> <mailto:[email protected]>
*Subject: *Re: Work on Emulation
Hi Alex,
I spent some time on the issue and I am sure it is related with
state but I am not able to discover the root cause. I removed the
inner-nested state definitions that are same with parent container
but still getting the exception.
But, when I changed the code
from : <s:Group id="mainApp" width="100%" height="100%"
excludeFrom="loggedOutState, dummyState">
to : <s:Group id="mainApp" width="100%" height="100%" >
the exception disappears. I am sharing the code with exception
for your interest :
https://drive.google.com/open?id=1o8y522jZhlz7Wmipl36FyHMqTMjMGI8t
<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdrive.google.com%2Fopen%3Fid%3D1o8y522jZhlz7Wmipl36FyHMqTMjMGI8t&data=02%7C01%7Caharui%40adobe.com%7C6326594052774917d96908d65ed8d54a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636800682721435809&sdata=vodtsU1c2zXOTh4aifzQ38NRTZbGP8GcfJI48ALcrLM%3D&reserved=0>
After removing "excludeFrom" from the code and move one step
further I am faced with another issue :
SkinnableContainer.js:241 Uncaught TypeError: Cannot read property
'contentView' of null
at
com.likya.pinara.main.PinaraUI.spark.components.SkinnableContainer.addElement
(SkinnableContainer.js:241)
at
Function.org.apache.royale.utils.MXMLDataInterpreter.org_apache_royale_utils_MXMLDataInterpreter_initializeStrandBasedObject
(MXMLDataInterpreter.js:236)
at
Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
(MXMLDataInterpreter.js:125)
at
Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
(MXMLDataInterpreter.js:266)
at
com.likya.pinara.main.PinaraUI.spark.components.SkinnableContainer.createChildren
(SkinnableContainer.js:190)
at
com.likya.pinara.main.PinaraUI.mx.core.UIComponent.initialize
(UIComponent.js:731)
at
com.likya.pinara.main.PinaraUI.mx.core.UIComponent.addedToParent
(UIComponent.js:288)
at
com.likya.pinara.main.PinaraUI.spark.components.SkinnableContainer.addedToParent
(SkinnableContainer.js:177)
at
PinaraUI_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
(UIBase.js:414)
at
PinaraUI_mx_managers_SystemManager.mx.managers.SystemManager.addChild
(SystemManager.js:109)
At line 241 of SkinnabeContainer.js :
var /** @type {org.apache.royale.core.IParent} */ contentView =
org.apache.royale.utils.Language.as(this.getLayoutHost().contentView,
org.apache.royale.core.IParent); *Uncaught TypeError: Cannot read
property 'contentView' of null*
this.getLayoutHost() returns null
And here is the sources for the second exception :
https://drive.google.com/open?id=1F4eFfx2Ayf7Q-rMPTJsuDCFiQDcBLcRv
<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdrive.google.com%2Fopen%3Fid%3D1F4eFfx2Ayf7Q-rMPTJsuDCFiQDcBLcRv&data=02%7C01%7Caharui%40adobe.com%7C6326594052774917d96908d65ed8d54a%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636800682721445819&sdata=1zl4d39f%2BL9yMvseQWwgx%2BKWUTePlGCVy5LPCbGDJj4%3D&reserved=0>
Thanks,
Serkan
8.12.2018 00:59 tarihinde Alex Harui yazdı:
HI Serkan,
That is the issue with the nested states. Please make sure
you’ve cleaned all those up. Then if it is still happening, I
will look again.
Thanks,
-Alex
*From: *Serkan Taş <[email protected]>
<mailto:[email protected]>
*Reply-To: *"[email protected]"
<mailto:[email protected]> <[email protected]>
<mailto:[email protected]>
*Date: *Friday, December 7, 2018 at 1:47 PM
*To: *"[email protected]"
<mailto:[email protected]> <[email protected]>
<mailto:[email protected]>
*Subject: *Re: Work on Emulation
Hi,
After compiling the new source, the issue related with
namespaces is fixed.
For the next step, I am getting error related with the source
*StatesWithTransitionsImpl.js, *here is the console log for
firefox :
unreachable code after return statement[Learn More]
SystemManager.js:196:2
unreachable code after return statement[Learn More]
JobListWithDetails.js:522:4
unreachable code after return statement[Learn More]
SystemManager.js:196:2
invalidateParentSizeAndDisplayList not implemented
Language.js:238:7
*TypeError: parent is undefined; can't access its
"getElementIndex" property[Learn More]
StatesWithTransitionsImpl.js:328:39
*
org_apache_royale_core_StatesWithTransitionsImpl_apply
file:///D:/dev/royale-emulation-works/github/bin/js-debug/org/apache/royale/core/StatesWithTransitionsImpl.js:328
org_apache_royale_core_StatesWithTransitionsImpl_stateChangeHandler
file:///D:/dev/royale-emulation-works/github/bin/js-debug/org/apache/royale/core/StatesWithTransitionsImpl.js:131
org_apache_royale_core_StatesWithTransitionsImpl_initialStateHandler
file:///D:/dev/royale-emulation-works/github/bin/js-debug/org/apache/royale/core/StatesWithTransitionsImpl.js:65
<anonymous> self-hosted:974 fireListeners
file:///D:/dev/royale-emulation-works/github/bin/js-debug/library/closure/goog/events/eventtarget.js:284
dispatchEventInternal_
file:///D:/dev/royale-emulation-works/github/bin/js-debug/library/closure/goog/events/eventtarget.js:382
dispatchEvent
file:///D:/dev/royale-emulation-works/github/bin/js-debug/library/closure/goog/events/eventtarget.js:196
dispatchEvent
file:///D:/dev/royale-emulation-works/github/bin/js-debug/org/apache/royale/events/EventDispatcher.js:71
dispatchEvent
file:///D:/dev/royale-emulation-works/github/bin/js-debug/org/apache/royale/core/HTMLElementWrapper.js:250
addedToParent
file:///D:/dev/royale-emulation-works/github/bin/js-debug/spark/components/SkinnableContainer.js:179
addElement
file:///D:/dev/royale-emulation-works/github/bin/js-debug/org/apache/royale/core/UIBase.js:414
addChild
file:///D:/dev/royale-emulation-works/github/bin/js-debug/mx/managers/SystemManager.js:109
mx_managers_SystemManager_initializeTopLevelWindow
file:///D:/dev/royale-emulation-works/github/bin/js-debug/mx/managers/SystemManager.js:249
start
file:///D:/dev/royale-emulation-works/github/bin/js-debug/mx/managers/SystemManager.js:232
<anonymous>
file:///D:/dev/royale-emulation-works/github/bin/js-debug/index.html:1051
Source map error: TypeError: NetworkError when attempting to
fetch resource.
Resource URL:
file:///D:/dev/royale-emulation-works/github/bin/js-debug/mx/managers/SystemManager.js
Source Map URL: ./SystemManager.js.map[Learn More]
The source :
org.apache.royale.core.StatesWithTransitionsImpl.prototype.org_apache_royale_core_StatesWithTransitionsImpl_apply
= function(oldState, s) {
var /** @type {Array} */ arr = s.overrides;
var foreachiter10_target = arr;
for (var foreachiter10 in foreachiter10_target)
{
var o = foreachiter10_target[foreachiter10];
{
if (org.apache.royale.utils.Language.is(o,
org.apache.royale.states.AddItems)) {
var /** @type {Object} */ ai = o;
if (ai.items == null) {
ai.items = ai.itemsDescriptor.items;
if (ai.items == null) {
ai.items =
org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray(ai.document,
null, ai.itemsDescriptor.descriptor);
ai.itemsDescriptor.items = ai.items;
}
}
var /** @type {boolean} */ childrenAdded = false;
var foreachiter11_target = ai.items;
for (var foreachiter11 in foreachiter11_target)
{
var item = foreachiter11_target[foreachiter11];
{
if
(!this.org_apache_royale_core_StatesWithTransitionsImpl_isItemInState(item,
oldState)) {
var /** @type {Object} */ parent = ai.document;
if (ai.destination != null)
parent = parent[ai.destination];
if (ai.relativeTo != null) {
var /** @type {Object} */ child =
ai.document[ai.relativeTo];
if (ai.destination == null)
parent = child.parent;
*var /** @type {number} */ index = parent.getElementIndex(child);*
if (ai.position == "after")
index++;
parent.addElementAt(item, index);
childrenAdded = true;
} else {
parent.addElement(item);
childrenAdded = true;
}
}
}}
if (childrenAdded &&
org.apache.royale.utils.Language.is(parent,
org.apache.royale.core.IContainer))
parent.childrenAdded();
} else if (org.apache.royale.utils.Language.is(o,
org.apache.royale.states.SetProperty)) {
var /** @type {Object} */ sp = o;
if (sp.target != null) {
sp.previousValue = sp.document[sp.target][sp.name];
sp.document[sp.target][sp.name] = sp.value;
} else {
sp.previousValue = sp.document[sp.name];
sp.document[sp.name] = sp.value;
}
} else if (org.apache.royale.utils.Language.is(o,
org.apache.royale.states.SetEventHandler)) {
var /** @type {Object} */ seh = o;
if (seh.target != null) {
seh.document[seh.target].addEventListener(seh.name,
seh.handlerFunction);
} else {
seh.document.addEventListener(seh.name,
seh.handlerFunction);
}
}
}}
};
Thanks,
Serkan
7.12.2018 22:47 tarihinde Serkan Taş yazdı:
Okay Alex Thank you. I am going to remove this kind of usages.
Serkan
7.12.2018 22:39 tarihinde Alex Harui yazdı:
I fixed the fact that an item used in nested states
where the containing states were different than a
child’s states was being put in the output list more
than once, resulting in the duplicate keys issue.
The exception I saw in your code is that when you have
a parent and child being added to or removed from the
same state, the current state handllng code doesn’t
like it because the parent may not have been created
before the child or vice versa, and we don’t want to
increase complexity of the state handling in these
cases, since it doesn’t make sense to have:
<Group id=”MainApp” excludeFrom”loggedOut”>
<MenuBar excludeFrom=”loggedOut” />
</Group>
-Alex
*From: *Serkan Taş <[email protected]>
<mailto:[email protected]>
*Reply-To: *"[email protected]"
<mailto:[email protected]>
<[email protected]> <mailto:[email protected]>
*Date: *Friday, December 7, 2018 at 11:32 AM
*To: *"[email protected]"
<mailto:[email protected]>
<[email protected]> <mailto:[email protected]>
*Subject: *Re: Work on Emulation
Hi Alex,
Thank you for the good news. I am going to try to
build the libraries locally, guess i can. And going to
remove nested include/exclude declarations.
As far as I remember you fixed the include/exclude
issue before, I am surprised to see the same bug here.
Is it something different ?
Serkan.
7.12.2018 22:23 tarihinde Alex Harui yazdı:
OK, The problem was that some addDependency calls
were being incorrectly computed and added to the
output. I pushed a fix for that. If you don’t
want to wait for the nightly or can’t build from
sources, you can get past this problem by
hand-editing the index.html. For each exception
you should find the entry in there twice. So for
mx_internal, you’ll see two addDependency calls
and the second one will be missing dependencies.
Remove that second one and the exception will go away.
Once I got that exception to go away, there was
one remaining exception due to nested states
again. The menubar above “messagePanel” is being
included/excluded from the same state as a
containing parent, in this case “mainApp”.
HTH,
-Alex