i got this error running a project i havent run in about a month, nothings changed except perhaps jmonkey itself was updated i think (i think from 3.0.4 to 3.0.5?). it used to run fine before. i fired it up to check out how i did something in it… anyways…
this is the line that is triggering the error:
tgScreen = new Screen(app, “Interface/MenuSystem/Style/style_map.xml”);
and it throws this exception
Problem loading style map: java.lang.IllegalStateException: No loader registered for type “xml”
if i remove my custom style map so its just new Screen(app); then it works fine, but of course i dont have my custom style map.
has something changed recently in tonegodgui or jme such that i have to set up the gui differently now or manually add the asset loader or something?
Yep yep… As @b00n stated, the xml loader was swapped out for something specific for the GUI so it didn’t trample on other peoples need for specific xml loaders.
@t0neg0d I had the same problem. I changed to “Interface/MenuSystem/Style/style_map.gui.xml”. But now I get: No loader registered for type “gui.xml”. What’s wrong?
Btw the version of tonegodgui I’m using was checked out of svn 2014-04-04.
@tuffe said:
@t0neg0d I had the same problem. I changed to "Interface/MenuSystem/Style/style_map.gui.xml". But now I get: No loader registered for type "gui.xml". What's wrong? :p
Btw the version of tonegodgui I’m using was checked out of svn 2014-04-04.
Make sure all local tonegodGUI xml files are renamed with this extension and also make sure that the local style_map.gui.xml file is pointing to files with the new extension.
Let me know if this was the issue or not, and we need to, we keep trying til we figure it out.
@t0neg0d I changed the style to the default def/style_map.gui.xml files that came with tonegodgui (in the src directory). All of the xml files had the gui.xml extension. Still get the error.
Hi! I have seen you active in other threads, so I just wanted to make sure that you have not missed this one. There’s no rush though, I have changed it myself for now. If you had used git I could have submitted a patch, but I don’t use svn.
Of course, if initializedLoader is not static, it has no reason to exist. But it whether or not a loader needs to be registered depends on the AssetManager object, not the Screen class. Out of curiosity, I checked, and it appears as if adding a loader, even though it has already been added, is not a problem:
[java]
public void addLoader(final Class<? extends AssetLoader> loaderType, String … extensions){
// Synchronized access must be used for any ops on classToLoaderMap
ImplThreadLocal local = new ImplThreadLocal(loaderType, extensions);
for (String extension : extensions){
extension = extension.toLowerCase();
synchronized (classToLoaderMap){
classToLoaderMap.put(loaderType, local);
extensionToLoaderMap.put(extension, local);
}
}
}[/java]