strange one - unable to resolve import on a class that is discovered in the IDE

20 views
Skip to first unread message

Steven Stark

unread,
May 10, 2013, 7:10:07 PM5/10/13
to jangaro...@googlegroups.com
Hello,

I am absolutely loving Jangaroo, thank you for this and keep up the amazing work.

so I have made a lib of one of our frameworks, let's call this fw3.

I set the packaging to 'jangaroo' for the framework and installed it.

I started a new project, added fw3 as a dependancy and started converting this second project.

In IntelliJ ( with jangaroo plugin installed ) I can see that it defiantly can find my class. I even used code completion to have it auto-input the import, it knows what the class is and that it's there.

I also checked the output of fw3, and in the 'catchall' .js file I see the class, and I also see it on it's own as a .js. Yes I cleaned and compiled, then installed before checking this.

Now when I go to compile this project, I get the following error:

[error] /projects/jangaroo-fremantlegames/src/main/joo/com/SomeRandomMediator.as(6): Error: in column 5: unable to resolve import of com.fw3.games.view.mediator.GameMediator


Also, I see it successfully gets past a couple other files that do use fw3.

also note that this GameMediator is the base class for the file that is erroring.

public class SomeRandomMediator extends GameMediator{

When I take out that extend GameMediator bit it will no longer complain on this file, but breaks on the next mediator that does extend GameMediator.


Is this a bug? Am I doing something wrong?

thanks,

-Steven

Steven Stark

unread,
May 10, 2013, 7:29:12 PM5/10/13
to jangaro...@googlegroups.com
Ok the reason is even odder.

This is caused by a for..each..in loop. I replaced this with a for..in loop and it works just fine


Steven Stark

unread,
May 10, 2013, 7:43:33 PM5/10/13
to jangaro...@googlegroups.com
this also happened when extending a very basic data event class from fw3. I had to not extend and instead copy the base code over manually to fix that one..

Steven Stark

unread,
May 10, 2013, 7:48:45 PM5/10/13
to jangaro...@googlegroups.com
And again.. this time it's a little harder to tell what the problem is... 

are there any issues with using a static function?

ex: 

txtField.text = StaticUtils.formatNumber( 6 );

Frank

unread,
May 13, 2013, 4:43:02 AM5/13/13
to Jangaroo Users
Steven,

these problems really sound odd, so I guess you must have hit some
special case. Maybe there is something wrong with how you define the
dependency between your application and your library (please check
<version>)?
It is really hard to tell what causes the error with the information
you provided so far, so could you probably send me a link to or zip of
your project to frankATjangaroo.net, so I can reproduce?
If you don't want to hand out all your source code (which I could
understand of course), I'd need at least
* the jangaroo-maven-plugin version you use, or even better all
pom.xml's of your project
* the source code of the class causing the compilation error
* the source code of the class not being found
* the full compile output of both the library module and the
application module that does not compile

Greetings
-Frank-
Message has been deleted

Steven Stark

unread,
May 13, 2013, 7:10:44 PM5/13/13
to jangaro...@googlegroups.com
I deleted my reply for now. I got ahead of myself here, and will look at this again in a day or so.

-Steven
Reply all
Reply to author
Forward
0 new messages