GBUI: BStyleSheetUtil patch

Hola Standtrooper,

I have the problem that when my style.bss-file is in another eclipse-project the BStyleSheetUtil can't locate it anymore. Using:


instead  of:


works for me. Actually I'm not so familiar with the classloader, but with the now provided syntax I load every resource for jME.

BTW: This patches only one method but there are still other resource-lookups that might be fixed if that is ok for you. Here the patch:

Index: src/java/com/jmex/bui/bss/
--- src/java/com/jmex/bui/bss/   (revision 325)
+++ src/java/com/jmex/bui/bss/   (working copy)
@@ -35,7 +35,7 @@
 public class BStyleSheetUtil {
     public static BStyleSheet getStyleSheet(final String path) {
-        return getStyleSheet(BStyleSheetUtil.class.getResourceAsStream(path));
+        return getStyleSheet(BStyleSheetUtil.class.getClassLoader().getResourceAsStream(path));
     public static BStyleSheet getStyleSheetFromFile(String fileName) {

BTW2: gbui is really great! Although I just started with it, it is really promising and bss is the best-thing ever :D

Keep on rocking, ToM

Interesting.  I'll look at this and see what's going on.  It also depends on how it's run, there are times where class.getResource will work for you, but getClassLoader().getResource will work other times.  I prefer getClassLoader(), but I'll look at it and see what is going on, there may have been something I did that hosed it up.

Sorry it's taken so long to get back to you on this, the last month has been really crazy.