Could it have characters that aren’t UTF-8 in it?
-Alex
*From: *Serkan Taş <serkan....@likyateknoloji.com>
*Reply-To: *"users@royale.apache.org" <users@royale.apache.org>
*Date: *Thursday, November 22, 2018 at 1:57 AM
*To: *"users@royale.apache.org" <users@royale.apache.org>
*Subject: *Re: Work on Emulation
Hi,
What should be the reason for this kid of errors ?
Kas 22, 2018 12:49:43 PM
com.google.javascript.jscomp.LoggerErrorManager println
SEVERE: ERROR - Cannot read file
D:/dev/royale-emulation-works/github/bin/js-debug/com/adobe/serializers/xml/XMLDecoder.js:
Failed to read:
D:\dev\royale-emulation-works\github\bin\js-debug\com\adobe\serializers\xml\XMLDecoder.js,
is th
is input UTF-8 encoded?
Thanks,
Serkan
22.11.2018 12:47 tarihinde Serkan Taş yazdı:
Hi,
I am getting compiler exception, for now i am going to
comment-out and go forward.
Thanks,
Serkan
DETAILS:
I amgetting exception
Error : ClassCastException : java.lang.ClassCastException:
org.apache.royale.compiler.internal.tree.mxml.MXMLConcatenatedDataBindingNode
cannot be cast to org.apache.royale.compiler.tree.mxml.IMXMLLiter
The source code throwing exception :
<fx:String id="satir1"><![CDATA[ Likya Bilgi
Teknolojileri ve İletişim Hizmetleri Ltd. Şti. ]]></fx:String>
<fx:String id="satir2"><![CDATA[ © 2008-{showYear()}
Tüm Hakları Saklıdır. ]]></fx:String>
<fx:String id="satir3"><![CDATA[ Müşteri : Xxxxx Yyyyyy
Zzzzzzz A.Ş. ]]></fx:String>
<fx:String id="satir4"><![CDATA[ Ürün Kimliği:
{licenseId} ]]></fx:String>
stringNode:
MXMLStringNode(MXMLStringID) "String" id="satir2" 169:2 loc:
9054-9144 abs: 9054-9144
D:\dev\royale-emulation-works\github\pinaraui-royale\src\com\likya\pinara\comps\AboutForm.mxml
MXMLConcatenatedDataBindingNode(MXMLConcatenatedDataBindingID)
"ConcatenatedDataBinding" 169:34 loc: 9086-9141 abs: 9086-9141
D:\dev\royale-emulation-works\github\pinaraui-royale\src\com\likya\pinara\comps\AboutForm.mxml
LiteralNode(LiteralStringID) String " � 2008-" 169:34 loc:
9086-9094 abs: 9086-9094
D:\dev\royale-emulation-works\github\pinaraui-royale\src\com\likya\pinara\comps\AboutForm.mxml
MXMLSingleDataBindingNode(MXMLDataBindingID) "DataBinding"
169:42 loc: 9094-9106 abs: 9094-9106
D:\dev\royale-emulation-works\github\pinaraui-royale\src\com\likya\pinara\comps\AboutForm.mxml
FunctionCallNode(FunctionCallID) "showYear" 169:43 loc:
9095-9103 abs: 9095-9103
D:\dev\royale-emulation-works\github\pinaraui-royale\src\com\likya\pinara\comps\AboutForm.mxml
IdentifierNode(IdentifierID) "showYear" 169:43 loc:
9095-9103 abs: 9095-9103
D:\dev\royale-emulation-works\github\pinaraui-royale\src\com\likya\pinara\comps\AboutForm.mxml
ContainerNode(ContainerID) SYNTHESIZED 169:51 loc:
9103-9105 abs: 9103-9105
D:\dev\royale-emulation-works\github\pinaraui-royale\src\com\likya\pinara\comps\AboutForm.mxml
LiteralNode(LiteralStringID) String " T�m Haklar� Sakl�d�r.
" 169:54 loc: 9106-9129 abs: 9106-9129
D:\dev\royale-emulation-works\github\pinaraui-royale\src\com\likya\pinara\comps\AboutForm.mxml
stringNode.getExpressionNode() :
MXMLConcatenatedDataBindingNode(MXMLConcatenatedDataBindingID)
"ConcatenatedDataBinding" 169:34 loc: 9086-9141 abs: 9086-9141
D:\dev\royale-emulation-works\github\pinaraui-royale\src\com\likya\pinara\comps\AboutForm.mxml
LiteralNode(LiteralStringID) String " � 2008-" 169:34 loc:
9086-9094 abs: 9086-9094
D:\dev\royale-emulation-works\github\pinaraui-royale\src\com\likya\pinara\comps\AboutForm.mxml
MXMLSingleDataBindingNode(MXMLDataBindingID) "DataBinding"
169:42 loc: 9094-9106 abs: 9094-9106
D:\dev\royale-emulation-works\github\pinaraui-royale\src\com\likya\pinara\comps\AboutForm.mxml
FunctionCallNode(FunctionCallID) "showYear" 169:43 loc:
9095-9103 abs: 9095-9103
D:\dev\royale-emulation-works\github\pinaraui-royale\src\com\likya\pinara\comps\AboutForm.mxml
IdentifierNode(IdentifierID) "showYear" 169:43 loc:
9095-9103 abs: 9095-9103
D:\dev\royale-emulation-works\github\pinaraui-royale\src\com\likya\pinara\comps\AboutForm.mxml
ContainerNode(ContainerID) SYNTHESIZED 169:51 loc:
9103-9105 abs: 9103-9105
D:\dev\royale-emulation-works\github\pinaraui-royale\src\com\likya\pinara\comps\AboutForm.mxml
LiteralNode(LiteralStringID) String " T�m Haklar� Sakl�d�r. "
169:54 loc: 9106-9129 abs: 9106-9129
D:\dev\royale-emulation-works\github\pinaraui-royale\src\com\likya\pinara\comps\AboutForm.mxml
Throws exception : valueNode =
(IMXMLLiteralNode)(stringNode.getExpressionNode());
(MXMLRoyaleEmitter.java:3035)
22.11.2018 12:08 tarihinde Serkan Taş yazdı:
Hi Alex,
Here is the content :
package com.adobe.fiber.core
{
public namespace model_internal =
"http://www.adobe.com/2008/flex/model/internal"
<http://www.adobe.com/2008/flex/model/internal>;
}
And yes it is included.
When getting scope for :
http://www.adobe.com/2006/flex/mx/internal
Result is :
SWCFileScope for
"D:\dev\royale-emulation-works\github\royale-asjs\frameworks\js\libs\MXRoyaleJS.swc"
mx_internal
http://www.adobe.com/2006/flex/mx/internal
Which is empty for
http://www.adobe.com/2008/flex/model/internal
SWC file scope can not be retrieved. I may have missing
something while packaging 3rd part libs.
Thanks,
Serkan
22.11.2018 01:14 tarihinde Alex Harui yazdı:
What does model_internal.as look like and is it
included in the source or libraries?
Compare to mx/core/mx_internal.as
Thanks,
-Alex
*From: *Serkan Taş <serkan....@likyateknoloji.com>
<mailto:serkan....@likyateknoloji.com>
*Reply-To: *"users@royale.apache.org"
<mailto:users@royale.apache.org>
<users@royale.apache.org> <mailto:users@royale.apache.org>
*Date: *Wednesday, November 21, 2018 at 1:09 PM
*To: *"users@royale.apache.org"
<mailto:users@royale.apache.org>
<users@royale.apache.org> <mailto:users@royale.apache.org>
*Subject: *Re: Work on Emulation
Hi Alex,
For getContainingToplevelDefinition
(DefinitionBase.java:537), input parameter is
definition =
"http://www.adobe.com/2008/flex/model/internal"
<http://www.adobe.com/2008/flex/model/internal>
Then trying to get :
ASScope currentContainingScope =
definition.getContainingASScope();
returns null.
Later,
currentContainingScope.getContainingDefinition(); is
called which throws exception.
It is related with namespaces as you referenced.
I am going to comment-out the function call and go
forward for now.
Thanks,
Serkan
21.11.2018 01:26 tarihinde Alex Harui yazdı:
Regarding the compiler errors. My guess is that it
has to do with the model_internal namespace. Maybe
get rid of it for now unless it is in a lot of
places. Or create a simple test case.
-Alex
*From: *Serkan Taş <serkan....@likyateknoloji.com>
<mailto:serkan....@likyateknoloji.com>
*Reply-To: *"users@royale.apache.org"
<mailto:users@royale.apache.org>
<users@royale.apache.org>
<mailto:users@royale.apache.org>
*Date: *Tuesday, November 20, 2018 at 1:36 PM
*To: *"users@royale.apache.org"
<mailto:users@royale.apache.org>
<users@royale.apache.org>
<mailto:users@royale.apache.org>
*Subject: *Re: Work on Emulation
Hi,
I submitted
PR:https://github.com/apache/royale-asjs/pull/349
<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fapache%2Froyale-asjs%2Fpull%2F349&data=02%7C01%7Caharui%40adobe.com%7C61f4abd76d394036c21b08d65060e195%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636784774374423840&sdata=XSHd6yjkfYQ2NLBvX2PWkly4u6O3CNOQ0ugXx82Kq%2Fk%3D&reserved=0>
I am getting compiler errors. I pasted three errors
in file :
https://drive.google.com/open?id=15b3Yvke-H96L1ud_9YE1JW4a4dgiA3F5
<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdrive.google.com%2Fopen%3Fid%3D15b3Yvke-H96L1ud_9YE1JW4a4dgiA3F5&data=02%7C01%7Caharui%40adobe.com%7C61f4abd76d394036c21b08d65060e195%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636784774374423840&sdata=%2BPrzfjHquOJ%2FsOXbW1ll3vzIJHADv%2B09JKOrU4OlhZk%3D&reserved=0>
I leaving for today. I am going to debug compiler
and try to understand what is going wrong when i
have time.
Thanks,
Serkan
20.11.2018 23:48 tarihinde Serkan Taş yazdı:
Okay Alex, it is really clarified :)
I am moving with making changes and going to
follow-up your PR.
Thank you so much,
Serkan
20.11.2018 23:43 tarihinde Alex Harui yazdı:
Yes, like I said, there is a change to the
config files I am going to make that should
reduce how often you get that error. For
now, you will have to be explicit and fully
qualify the name. The MXML compiler
automatically imports certain classes and
it is being told by royale-config.xml to
import org.apache.royale.events.MouseEvent
which conflicts with mx.events.MouseEvent.
I am going to see if we can change the
default imports in flex-config.xml and have
migrating users use flex-config.xml instead
of royale-config.xml by adding
+configname=”flex” to their compiler options.
I’m working on these changes now to see if
there are any issues with doing this.
-Alex
*From: *Serkan Taş
<serkan....@likyateknoloji.com>
<mailto:serkan....@likyateknoloji.com>
*Reply-To: *"users@royale.apache.org"
<mailto:users@royale.apache.org>
<users@royale.apache.org>
<mailto:users@royale.apache.org>
*Date: *Tuesday, November 20, 2018 at 12:40 PM
*To: *"users@royale.apache.org"
<mailto:users@royale.apache.org>
<users@royale.apache.org>
<mailto:users@royale.apache.org>
*Subject: *Re: Work on Emulation
I remove the flash import and just imported
mx.events.MouseEvent but vcompiler is
forcing to replace all occurrence of
MouseEvent with mx.events.MouseEvent.
Getting errors :
DependencyListForm.mxml(150): col: 50
Error: Ambiguous reference to MouseEvent
protected function
depEkle_clickHandler(event:MouseEvent):void
^
20.11.2018 23:33 tarihinde Alex Harui yazdı:
Hi Serkan,
You can override addedToParent() and
call your handler.
I don’t have enough context to answer
your questions about MouseEvent. In
Royale, flash.events.MouseEvents should
never be used. When running as a SWF,
Royale traps all mouse events and
re-dispatches them as
org.apache.royale.events.MouseEvent.
However, it does not have all of the
properties that flash.events.MouseEvent
has (and shouldn’t since we don’t want
properties like “stageX” in the Royale
API since “stage” doesn’t mean anything
to users who don’t know Flash. At
some point in time, the emulation
Applications will replace the code that
traps both Flash and Browser MouseEvent
and re-dispatch them as
mx.events.MouseEvent. So all migrated
code should use mx.events.MouseEvent
and not any other MouseEvent.
It is ok for SWF code to reference
flash.events.MouseEvent. Cleaning it
up so it doesn’t would be nice, but
probably not required.
HTH,
-Alex
*From: *Serkan Taş
<serkan....@likyateknoloji.com>
<mailto:serkan....@likyateknoloji.com>
*Reply-To: *"users@royale.apache.org"
<mailto:users@royale.apache.org>
<users@royale.apache.org>
<mailto:users@royale.apache.org>
*Date: *Tuesday, November 20, 2018 at
12:22 PM
*To: *"users@royale.apache.org"
<mailto:users@royale.apache.org>
<users@royale.apache.org>
<mailto:users@royale.apache.org>
*Subject: *Re: Work on Emulation
One more addition :
do I have to change all occurrence of
MouseEvent with mx.events.MouseEvent
to get rid of "ambiguous" usage error ?
20.11.2018 23:19 tarihinde Serkan Taş
yazdı:
Hi Alex,
Unfortunately i need to adjust
dynamically header properties when
the component added/removed each
time. But for just now i may
comment-out and come back later for
the check if the emulation is
really required.
For the mouse event, as i
understand, both swf and js
mx.events.MouseEvent is going to be
used and then i have to remove
"import flash.events.MouseEvent".
So why some of the files still
contain the flash import ? Just i
am little bit mixed.
Thanks,
Serkan
20.11.2018 23:11 tarihinde Alex
Harui yazdı:
Hi Serkan,
So far, there aren’t others
using addedToStage event so it
would be better if Royale
didn’t have to emulate it.
There may be some other event
you can use instead like
“initComplete” unless you need
that code to run every time you
remove and re-add the Panel.
Regarding MouseEvent, you just
reminded me of something on my
list to do, which is to
reconfigure the -config.xml
files so there aren’t CSS
conflicts in apps that aren’t
using the emulation. But for
now, you can just fully qualify
the type:
protected function
depEkle_clickHandler(event:mx.events.MouseEvent):void
you will have to import
mx.events.MouseEvent for both
JS and SWF.
HTH,
-Alex
*From: *Serkan Taş
<serkan....@likyateknoloji.com>
<mailto:serkan....@likyateknoloji.com>
*Reply-To:
*"users@royale.apache.org"
<mailto:users@royale.apache.org>
<users@royale.apache.org>
<mailto:users@royale.apache.org>
*Date: *Tuesday, November 20,
2018 at 11:55 AM
*To: *"users@royale.apache.org"
<mailto:users@royale.apache.org>
<users@royale.apache.org>
<mailto:users@royale.apache.org>
*Subject: *Re: Work on Emulation
Hi,
I would like to get advises to
resolve these two errors :
1:
Header.mxml(98): col: 75 Error:
This attribute is unexpected.
It will be ignored.
<s:Panel id="headerPanel"
width="100%" height="20"
chromeColor="#E1E5EA"
addedToStage="headerPanel_addedToStageHandler(event
as Event)">
^
may i just remove the handler ?
2:
DependencyListForm.mxml(156):
col: 50 Error: Ambiguous
reference to MouseEvent
protected function
depEkle_clickHandler(event:MouseEvent):void
^
I tired adding import statement
with compiler directive :
COMPILE::SWF {
import
flash.events.MouseEvent;
}
COMPILE::JS {
import
mx.events.MouseEvent;
}
but still the same error is
reported.
Thanks,
Serkan
20.11.2018 13:09 tarihinde
Serkan Taş yazdı:
Hi Alex,
Nice to hear that it is
resolved :)
I may go through my
emulation process...
Thanks,
Serkan
19.11.2018 22:47 tarihinde
Alex Harui yazdı:
Wow, it turns out to be
a relatively simple
scenario. It is
amazing that none of
our examples have MXML
files that reference
other MXML files by
type. Our Applications
might have a
MyInitialView tag, but
no other code in our
examples actually
create a variable like
“var
myView:MyInitialView”
or in your case,
“import
somepackage.MyInitialView”.
I just pushed a fix for
that. Thanks for
helping us track that down.
-Alex
*From: *Alex Harui
<aha...@adobe.com>
<mailto:aha...@adobe.com>
*Reply-To:
*"users@royale.apache.org"
<mailto:users@royale.apache.org>
<users@royale.apache.org>
<mailto:users@royale.apache.org>
*Date: *Monday,
November 19, 2018 at
12:36 AM
*To:
*"users@royale.apache.org"
<mailto:users@royale.apache.org>
<users@royale.apache.org>
<mailto:users@royale.apache.org>
*Subject: *Re: Work on
Emulation
OK, I will try this
tomorrow. I have to
stop for tonight.
-Alex
*From: *Serkan Taş
<serkan....@likyateknoloji.com>
<mailto:serkan....@likyateknoloji.com>
*Reply-To:
*"users@royale.apache.org"
<mailto:users@royale.apache.org>
<users@royale.apache.org>
<mailto:users@royale.apache.org>
*Date: *Sunday,
November 18, 2018 at
12:59 AM
*To:
*"users@royale.apache.org"
<mailto:users@royale.apache.org>
<users@royale.apache.org>
<mailto:users@royale.apache.org>
*Subject: *Re: Work on
Emulation
Hi Alex,
I prepared a file
called FindBug.mxml in
my project beside my
main file. :
https://github.com/likyateknoloji/pinaraui-royale/blob/master/src/com/likya/pinara/main/FindBug.mxml
<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flikyateknoloji%2Fpinaraui-royale%2Fblob%2Fmaster%2Fsrc%2Fcom%2Flikya%2Fpinara%2Fmain%2FFindBug.mxml&data=02%7C01%7Caharui%40adobe.com%7C61f4abd76d394036c21b08d65060e195%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636784774374423840&sdata=e%2B3xNg9py4SJ72aLAxYzcCJVcvQgbPu3WuNXc1t4lEg%3D&reserved=0>
Content :
<?xml version="1.0"
encoding="utf-8"?>
<s:TitleWindow
xmlns:fx="http://ns.adobe.com/mxml/2009"
<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C61f4abd76d394036c21b08d65060e195%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636784774374423840&sdata=TevplVBhpzJzjaKtBt3lI3QIoMnUIXm62ZasPTYriV0%3D&reserved=0>
xmlns:s="library://ns.apache.org/royale/spark"
xmlns:mx="library://ns.apache.org/royale/mx"
xmlns:comps="com.likya.pinara.comps.*"
>
<fx:Script>
<![CDATA[
]]>
</fx:Script>
<fx:Declarations>
</fx:Declarations>
<comps:MenuBar
excludeFrom="loggedOutState,
dummyState" id="menuBar"/>
</s:TitleWindow>
This code makes the
compiler hang wtih line
:ASScopeCache done with
lock in
getQualifiedScopeChainMap
When i comment out the
line <!comps:MenuBar
excludeFrom="loggedOutState,
dummyState"
id="menuBar"/-->
Than it completes with
warnings:
Kas 18, 2018 11:54:53
AM
com.google.javascript.jscomp.LoggerErrorManager
printSummary
WARNING: 1 error(s), 2
warning(s)
The project 'FindBug'
has been successfully
compiled and optimized.
23.416603651 seconds
I my previous mail in
thread i told that the
problem is related with
namespace, but i guess
the namespace
declaration masked the
problem behind.
If you want to
regenerate the error,
you need to clone the
project and modify the
build script :
https://github.com/likyateknoloji/pinaraui-royale
<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flikyateknoloji%2Fpinaraui-royale&data=02%7C01%7Caharui%40adobe.com%7C61f4abd76d394036c21b08d65060e195%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636784774374423840&sdata=h0J%2BX2I2W%2Fh%2Fw6qlS1J9iwOjreYMP8HYOW2RWPrwxzU%3D&reserved=0>
The only vars in
scripts need to be
changed :
set
COMPILER_PATH=D:\dev\royale-emulation-works\apache-royale-0.9.4-bin-js-swf\royale-asjs\js\bin
set
ROYALE_ASJS=D:\dev\royale-emulation-works\github\royale-asjs
I am leaving for today
maybe look at evening
or monday evening.
Thanks,
Serkan
17.11.2018 18:40
tarihinde Serkan Taş yazdı:
Let me preserve
thread :
I found out that
namespace
definitions in the
beginning of file -
in application tag
- causes compiler
to hang.
e.g.
xmlns:comps="com.likya.pinara.comps.*"
When i remove these
namespace
definitions, than
compiler goes on.
This workaround let
me to continue a
little but real
solution is
required for final :
PinaraUI.mxml(630):
col: 3 Error:
Unknown namespace
jobmanager.
<jobmanager:JobManager
showBusyCursor="true"
id="jobManagerService"
fault="jobManagerService_faultHandler(event)"/>
Thanks.
Serkan
17.11.2018 00:41
tarihinde Alex
Harui yazdı:
OK, I may not
get to it until
Sunday night or
Monday.
-Alex
*From: *Serkan
Taş
<serkan....@likyateknoloji.com>
<mailto:serkan....@likyateknoloji.com>
*Reply-To:
*"users@royale.apache.org"
<mailto:users@royale.apache.org>
<users@royale.apache.org>
<mailto:users@royale.apache.org>
*Date: *Friday,
November 16,
2018 at 12:58 PM
*To:
*"users@royale.apache.org"
<mailto:users@royale.apache.org>
<users@royale.apache.org>
<mailto:users@royale.apache.org>
*Subject: *Re:
Work on Emulation
Hi Alex,
List is
ignoring my
mails
sometimes
:) as you
may
understand
from my
last mail.
I finally
finished
preparing
my project
on github
to be build
easily.
Project
path :
https://github.com/likyateknoloji/pinaraui-royale/
<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flikyateknoloji%2Fpinaraui-royale%2F&data=02%7C01%7Caharui%40adobe.com%7C61f4abd76d394036c21b08d65060e195%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636784774374423840&sdata=qC9FchGJ8ZVk3m1csfU6yxDH0tn%2FyXYKrcA7U4Tayj0%3D&reserved=0>
You can
find
details
about
command-line
options in
the batch
file
https://github.com/likyateknoloji/pinaraui-royale/blob/master/pinara-git-build.bat
<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flikyateknoloji%2Fpinaraui-royale%2Fblob%2Fmaster%2Fpinara-git-build.bat&data=02%7C01%7Caharui%40adobe.com%7C61f4abd76d394036c21b08d65060e195%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636784774374423840&sdata=%2BZQQmv7Q51ZYYITlOyMQ%2B0PCoWieIZsUwb72Imn3UHQ%3D&reserved=0>
I do not
like to put
libs on
github but
sometimes
it is best
solution,
and the
swc's are
under libs
folder.
If you have
any
questions
let me know.
Thanks,
Serkan
16.11.2018
10:53
tarihinde
Alex Harui
yazdı:
Hi Serkan,
I was
hoping
the
output
would
show an
unreleased
lock,
but
every
lock
seems
to get
released.
Is all
of your
code in
your
GitHub
account?
If so,
I will
try to
download
it and
see if
it
hangs
for
me.
Please
put the
exact
command-line
options
you are
using.
If you
have
custom
SWCs
that
this
compile
will
need,
maybe
you can
put
those
in
GitHub
too.
I’m
done
working
for
tonight.
I will
check
tomorrow.
Thanks,
-Alex