Win a copy of Java EE 8 High Performance this week in the Java/Jakarta EE forum!

Lance Colton

Ranch Hand
+ Follow
since Nov 25, 2010
Lance likes ...
Android Eclipse IDE Ubuntu
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Lance Colton

Anyone from coderanch going to DEFCON this year?
6 years ago
Detailed table of contents, the book looks very cool.

Any plans for releasing an ebook for the Kindle?
6 years ago
I've been trying to force myself into having the time to dabble in android game development. What sort of technology is leveraged in the book? raw OpenGL ES? different SDK's which are built on top of it?

Is it just 2d, or 3d, or mesh both? does it favour one over the other?

The books I've bought over android development haven't been very good, and either went into too much detail over little aspects, or too little detail over important aspects of the development, and development environment.

6 years ago

Steven Mann wrote:Were you guys rooting for Watson in Jeopardy. How do you feel about him winning? - Steven

Just, incredible. Depressed when Ken pulled ahead in the daily double, then cheered as Watson unleashed a can of pwnage.
7 years ago

Stuart McCulloch wrote:
The Maven Appendix contains examples for building various sorts of OSGi bundles, but it's not a general guide to Maven. If you want to teach yourself Maven from scratch then I can recommend the free books from Sonatype (disclaimer: I work for Sonatype).

Thanks for the link! I bookmarked it and will email the pdf files to my kindle a bit later, it looks very cool.

Stuart McCulloch wrote:
Unfortunately we didn't have enough space to cover Eclipse RCP, but there are plenty of good RCP books around. However a lot of the concepts and best-practices in the book can be used when building RCP applications and Eclipse plugins. The Maven Appendix covers building applications with the maven-bundle-plugin (we tend to use bnd for examples in the book).

I bought "Eclipse Plugins", which is extremely relevant to Eclipse RCP and a pretty good book.
Why I asked about Maven was I have expirence with ant, and always wanted to find the time to teach myself Maven, so there are Maven build examples inside of "OSGi in Action?"
First of all, this promo is probably the most exciting I've seen since I've been on coderanch, OSGi in a very cool topic.

Does the book go into Eclipse RCP development in any way? (or any kind of RCP development built on the OSGi framework) or is it strictly a book relating to building your own modular applications on the OSGi framework? I see an Appendix for Maven on this page does it cover Maven? or how to integrate OSGi application execution into Maven?

Thanks in advance

Rob Spoor wrote:But you're not calling sprites.get("play.png"), you're calling sprites.get("name").

There are no words, to express, how retarded I feel for that XD

Thank you so much, it works perfectly now.
7 years ago

Rob Spoor wrote:Are you sure that sprites.containsKey("play.png") returns true? In other words, that sprites.get("play.png") does not return null?
You are calling sprites.get("name") - using the String literal "name" instead of the parameter name. As a results, the returned Image probably is null.

Yes, each name in the <String, Image> HashMap is there, however the Image objects are all null. something is wrong with the image construction through GC, and I think it might have something to do with the Display object that had to be passed.

let me post the entire source code,

Here is the XML:
7 years ago
I'm trying to create a class, which will take a path to an Image, and an XML file which defines sub-images within the image, and return each sub image as SWT Image objects.

It basically should work like this

with the XML Sprite sheet looking like this

I think the problem is SWT doesn't like for the display object to be passed to an outside class, is there any way to resolve this?

The stack trace:

The is the result of me trying to draw a returned image to a Canvas in a Shell with the same Display.
7 years ago
Sorry I didn't get back to you :-) I ment to, however it slipped my mind when I started getting more busy. I'm glad you got it worked out
7 years ago
The android platform has OpenGL ES support, that's really the core of game development on the Android platform (until 3.0 as the author mentioned when I asked about it)

Here is the relevant thread in which the topic was discussed
7 years ago
If I thought about it more I probably realized that, however for some reason thought the failure would happen as soon as you attempted to access the list
7 years ago

lscolton@Workstation:~/Desktop$ javac
lscolton@Workstation:~/Desktop$ java Main
[one, two, three, 4, 5, 6]
Exception in thread "main" java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
at Main.main(

So close >.< doesn't fail in the foor loop until it gets to the int's, I thought It would fail before it started iterating.
7 years ago

Mike Simmons wrote:
The key is the double cast on line 4. The cast to raw List causes the compiler to forget the generic parameter <Object> entirely. And the cast to List<String> tells the compiler it has a new generic parameter, <String>. Casting to and from raw types would generate a warning, so using @SuppressWarnings is nice to tell the compiler to shut up about that.

That is really cool, I had no idea you could do that thank you

Mike Simmons wrote:
For fun, try predicting what will happen with the following code. Will it compile? Will it run? Exactly what line will the error (compilation error or runtime exception) occur on? Why?

After trying to decide in advance what the answer is, try it and see. Compile it and run it (if possible), and see what happens. Was it what you expected?

Sound's fun, I predict the program will fail at the for loop it will throw a CastException. (will post results)
7 years ago