Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with invocation with overloaded methods. #10

Closed
piotr-j opened this issue Apr 7, 2015 · 10 comments
Closed

Issue with invocation with overloaded methods. #10

piotr-j opened this issue Apr 7, 2015 · 10 comments

Comments

@piotr-j
Copy link
Contributor

piotr-j commented Apr 7, 2015

While working on a lib to get it to work with GWT, Ive found a bug in execCommand(String command). Overloading methods doesnt work, since the methods returns on first failure. This can be easily fixed by removing return at line 487. However, the log message and stacktrace remains and makes it ugly. Checking primitive types is little annoying, so I propose that exceptions are logged after the loop, if all possible candidates failed.

Ill PR working GWT implementation once this issue is resolved.

@StrongJoshua
Copy link
Owner

Getting this to work with GWT has been difficult, I agree. I also cannot test to see if what I have done works because the game using this library won't run, but it did compile. I'll sync my local changes with the master branch and maybe you can check if I did it correctly.

@piotr-j
Copy link
Contributor Author

piotr-j commented Apr 8, 2015

Getting it to work wasnt so bad, replaced reflection with libgdx stuff and it works. However, the Date stuff is a lot harder. I dont need it for the project im working on, but i just removed relevant code. No idea how to solve it cleanly.

@piotr-j
Copy link
Contributor Author

piotr-j commented Apr 8, 2015

Ive added a repo with the test gwt thing im working on, its very simple and you should be able to run it.
Edited console src is included.
Things i did to get it to work:

  • replaced java reflection with libgdx wrappers
  • removed Date stuff from LogEntry
  • added Console.gwt.xml
  • added stuff to GdxDefinitions in html

https://github.com/piotr-j/gwt-testing

@StrongJoshua
Copy link
Owner

Oh ok, so you actually included the console code in the game code. My implementation (i.e. my most recent commit) should still work with Maven. Check out this post on the libgdx forums: http://www.badlogicgames.com/forum/viewtopic.php?f=11&t=18831 that error may or may not come from my console's code. I'll have to look into it further.

@piotr-j
Copy link
Contributor Author

piotr-j commented Apr 9, 2015

I only did that because i didnt bother to compile it and add as jar for quick test project. Here it is on my site, f2 to show console.
http://www.piotrjastrzebski.io/static/gwttest/index.html

@StrongJoshua
Copy link
Owner

Have you tried the commands such as printLog()? I ask because I wonder where it would print to and if I should see if I could add a feature to disable this command if it detects it is being run from HTML (since anyone could have it print and possibly clog up your entire server).

@StrongJoshua
Copy link
Owner

Btw, have you been able to get the console to work in HTML without passing it your own skin? It seems to be unable to read its default skin file...

@piotr-j
Copy link
Contributor Author

piotr-j commented Apr 9, 2015

It didnt want to work on desktop when i just copied source, so i didnt try on gwt. But it wouldnt be surprising if it didnt work on gwt as it uses classpath. GWT is a second class citizen where backends are concerned. I think the best option is to provide GWT compatible implementation, like box2d. Im not certain of the details how that works.

@piotr-j
Copy link
Contributor Author

piotr-j commented Apr 17, 2015

Since you solved these problems, it should be ok to close this.

@piotr-j piotr-j closed this as completed Apr 17, 2015
@StrongJoshua
Copy link
Owner

I hope I solved them :3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants