Re: Linkage problem for asjs compiler

2018-12-26 Thread Alex Harui
Interesting.  Can you post the output JS file and enough of the AS file to see 
the “public class” and “extends” and “implements”.  The properties and methods 
shouldn’t matter.

-Alex

From: mrchnk 
Reply-To: "users@royale.apache.org" 
Date: Wednesday, December 26, 2018 at 1:46 PM
To: "users@royale.apache.org" 
Subject: Re: Linkage problem for asjs compiler

I just tested latest nightly build 1735

Now I have another issue with linker:

That time some required dependencies are omitted in index.html. But that 
classes are declared with dependencies on themselves. Also, no circular 
dependencies reported while using "-diagnostics=32768".

   goog.addDependency('../../../oasis/gifts/WishGiftAddCommand.js', 
['oasis.gifts.WishGiftAddCommand'], 
['org.puremvc.as3.patterns.command.SimpleCommand', 
'oasis.gifts.WishGiftAddCommand', 'oasis.gifts.WishGiftAddCommand', 
'oasis.gifts.WishGiftAddCommand']);

Build output and warnings are available at the old location (with prefix 1735-):
https://drive.google.com/open?id=17IRbQ1xAfpAirjbW6YjQPFEYHmL1HnhC

On Thu, Dec 20, 2018 at 8:16 AM Alex Harui 
mailto:aha...@adobe.com>> wrote:
FWIW, I just pushed changes that should allow this sort of configuration (even 
though, IMO, referencing subclasses from base classes is not a recommended 
practice).

-Alex

From: mrchnk mailto:mrc...@gmail.com>>
Reply-To: "users@royale.apache.org" 
mailto:users@royale.apache.org>>
Date: Tuesday, December 18, 2018 at 1:26 PM

To: "users@royale.apache.org" 
mailto:users@royale.apache.org>>
Subject: Re: Linkage problem for asjs compiler

I appreciate your help, Alex!
Thanks. I pass linkage problems with that investigations.

On Wed, Dec 19, 2018 at 12:21 AM Alex Harui 
mailto:aha...@adobe.com>> wrote:
Hi,

I saw that, but I think the compiler should be allowing that, so that’s what 
I’m going to look into next.

JavaScript should be able to set up these classes and constructors without 
problem.

-Alex

From: mrchnk mailto:mrc...@gmail.com>>
Reply-To: "users@royale.apache.org" 
mailto:users@royale.apache.org>>
Date: Tuesday, December 18, 2018 at 12:24 PM

To: "users@royale.apache.org" 
mailto:users@royale.apache.org>>
Subject: Re: Linkage problem for asjs compiler

I found the issue for that case. The problem is in Animation constructor:

...
if (_rootTimeline == null) {
if (_rootFrame == -1) {
_rootFrame = 0;
_rootFramesTimeline = new SimpleTimeline();
_rootTimeline = new SimpleTimeline();
_rootTimeline._startTime = getTimer() / 1000;
_rootFramesTimeline._startTime = 0;
_rootTimeline._active = _rootFramesTimeline._active = true;
ticker.addEventListener("enterFrame", _updateRoot, false, 0, true);
} else {
return;
}
}
...

It tries to instantiate SimpleTimeout which is derived from Animation itself. 
That's tricky.
After dealing with that I faced other circular dependencies:

- using a derived class in base's method:

class Base {
function doSomething() {
if (this is Derived) {
...
}
}
}
class Derived extends Base { ... }

- one more setup with static initialized const

class Facade {
static public var api: Service = new Service();
}
class Service {
function doSomething(forClient:Client) {
forClient.done();
}
}
class Client {
function doSomething() {
Facade.api.doSomething(this);
}
function done() {
trace("done");
}
}


On Tue, Dec 18, 2018 at 10:00 PM mrchnk 
mailto:mrc...@gmail.com>> wrote:
I think the problem with that classes that SimpleTimeline extends Animation, 
but Animation has fields (static too) with type SimpleTimeline.

On Tue, Dec 18, 2018 at 9:54 PM mrchnk 
mailto:mrc...@gmail.com>> wrote:
Hi, Alex.

I tried build #1713. Log output says that following circular dependency is 
found:

...
Circular Dependency Found
[com.greensock.core.Animation]
[com.greensock.core.SimpleTimeline]
[com.greensock.core.Animation]
End of Circular Dependency
...

Here are both .as and .js files mentioned in that dependency

Tour De Jewel now with Source Code included

2018-12-26 Thread Carlos Rovira
Hi!

just let you know that Tour De Jewel has now a tab with source code in each
example

Here's the tweet about it:

https://twitter.com/ApacheRoyale/status/1078091214409351168

Please, share and retweet if you like it! :)

thanks

-- 
Carlos Rovira
http://about.me/carlosrovira


Re: Linkage problem for asjs compiler

2018-12-26 Thread mrchnk
I just tested latest nightly build 1735

Now I have another issue with linker:

That time some required dependencies are omitted in index.html. But that
classes are declared with dependencies on themselves. Also, no circular
dependencies reported while using "-diagnostics=32768".

   goog.addDependency('../../../oasis/gifts/WishGiftAddCommand.js',
['oasis.gifts.WishGiftAddCommand'],
['org.puremvc.as3.patterns.command.SimpleCommand',
'oasis.gifts.WishGiftAddCommand', 'oasis.gifts.WishGiftAddCommand',
'oasis.gifts.WishGiftAddCommand']);

Build output and warnings are available at the old location (with prefix
1735-):
https://drive.google.com/open?id=17IRbQ1xAfpAirjbW6YjQPFEYHmL1HnhC

On Thu, Dec 20, 2018 at 8:16 AM Alex Harui  wrote:

> FWIW, I just pushed changes that should allow this sort of configuration
> (even though, IMO, referencing subclasses from base classes is not a
> recommended practice).
>
>
>
> -Alex
>
>
>
> *From: *mrchnk 
> *Reply-To: *"users@royale.apache.org" 
> *Date: *Tuesday, December 18, 2018 at 1:26 PM
>
>
> *To: *"users@royale.apache.org" 
> *Subject: *Re: Linkage problem for asjs compiler
>
>
>
> I appreciate your help, Alex!
>
> Thanks. I pass linkage problems with that investigations.
>
>
>
> On Wed, Dec 19, 2018 at 12:21 AM Alex Harui  wrote:
>
> Hi,
>
>
>
> I saw that, but I think the compiler should be allowing that, so that’s
> what I’m going to look into next.
>
>
>
> JavaScript should be able to set up these classes and constructors without
> problem.
>
>
>
> -Alex
>
>
>
> *From: *mrchnk 
> *Reply-To: *"users@royale.apache.org" 
> *Date: *Tuesday, December 18, 2018 at 12:24 PM
>
>
> *To: *"users@royale.apache.org" 
> *Subject: *Re: Linkage problem for asjs compiler
>
>
>
> I found the issue for that case. The problem is in Animation constructor:
>
>
>
> ...
>
> if (_rootTimeline == null) {
>
> if (_rootFrame == -1) {
>
> _rootFrame = 0;
>
> _rootFramesTimeline = new SimpleTimeline();
>
> _rootTimeline = new SimpleTimeline();
>
> _rootTimeline._startTime = getTimer() / 1000;
>
> _rootFramesTimeline._startTime = 0;
>
> _rootTimeline._active = _rootFramesTimeline._active = true;
>
> ticker.addEventListener("enterFrame", _updateRoot, false, 0,
> true);
>
> } else {
>
> return;
>
> }
>
> }
>
> ...
>
>
>
> It tries to instantiate SimpleTimeout which is derived from Animation
> itself. That's tricky.
>
> After dealing with that I faced other circular dependencies:
>
>
>
> - using a derived class in base's method:
>
>
>
> class Base {
>
> function doSomething() {
>
> if (this is Derived) {
>
> ...
>
> }
>
> }
>
> }
>
> class Derived extends Base { ... }
>
>
>
> - one more setup with static initialized const
>
>
>
> class Facade {
>
> static public var api: Service = new Service();
>
> }
>
> class Service {
>
> function doSomething(forClient:Client) {
>
> forClient.done();
>
> }
>
> }
>
> class Client {
>
> function doSomething() {
>
> Facade.api.doSomething(this);
>
> }
>
> function done() {
>
> trace("done");
>
> }
>
> }
>
>
>
>
>
> On Tue, Dec 18, 2018 at 10:00 PM mrchnk  wrote:
>
> I think the problem with that classes that SimpleTimeline extends
> Animation, but Animation has fields (static too) with type SimpleTimeline.
>
>
>
> On Tue, Dec 18, 2018 at 9:54 PM mrchnk  wrote:
>
> Hi, Alex.
>
>
>
> I tried build #1713. Log output says that following circular dependency is
> found:
>
>
>
> ...
>
> Circular Dependency Found
>
> [com.greensock.core.Animation]
>
> [com.greensock.core.SimpleTimeline]
>
> [com.greensock.core.Animation]
>
> End of Circular Dependency
>
> ...
>
>
>
> Here are both .as and .js files mentioned in that dependency
>
> https://gist.github.com/mrchnk/caba399919690a785761242c35e5a01a
> 
>
>
>
> Build output and warnings are available at the old location (with prefix
> 1713-):
>
> https://drive.google.com/open?id=17IRbQ1xAfpAirjbW6YjQPFEYHmL1HnhC
> 
>
>
>
> On Tue, Dec 18, 2018 at 11:43 AM Alex Harui  wrote:
>
> Hi,
>
>
>
> That log showed that lots of files are not in the sorted order, not just
> Client.  In a test