diff --git a/src/helma/framework/core/TypeManager.java b/src/helma/framework/core/TypeManager.java index a94a4ec7..7b383625 100644 --- a/src/helma/framework/core/TypeManager.java +++ b/src/helma/framework/core/TypeManager.java @@ -129,6 +129,7 @@ public class TypeManager { String pname = (String) it.next(); if (prototypes.get (pname) == null) { Prototype proto = new Prototype (pname, app); + registerPrototype (pname, new File (appDir, pname), proto, false); prototypes.put (pname, proto); } } @@ -221,60 +222,60 @@ public class TypeManager { // show the type checker thread that there has been type activity idleSeconds = 0; - String list[] = dir.list(); HashMap ntemp = new HashMap (); HashMap nfunc = new HashMap (); HashMap nact = new HashMap (); HashMap nskins = new HashMap (); - HashMap updatables = new HashMap (list.length); + HashMap updatables = new HashMap (); if (update) { - for (int i=0; i 0) { - try { - FunctionFile ff = new FunctionFile (tmpfile, tmpname, proto); - updatables.put (list[i], ff); - nfunc.put (tmpname, ff); - } catch (Throwable x) { - app.logEvent ("Error creating prototype: "+x); - } + } else if (list[i].endsWith (app.scriptExtension) && tmpfile.length () > 0) { + try { + FunctionFile ff = new FunctionFile (tmpfile, tmpname, proto); + updatables.put (list[i], ff); + nfunc.put (tmpname, ff); + } catch (Throwable x) { + app.logEvent ("Error creating prototype: "+x); + } - } else if (list[i].endsWith (app.actionExtension) && tmpfile.length () > 0) { - try { - Action af = new Action (tmpfile, tmpname, proto); - updatables.put (list[i], af); - nact.put (tmpname, af); - } catch (Throwable x) { - app.logEvent ("Error creating prototype: "+x); - } - } else if (list[i].endsWith (app.skinExtension)) { - try { - SkinFile sf = new SkinFile (tmpfile, tmpname, proto); - updatables.put (list[i], sf); - nskins.put (tmpname, sf); - } catch (Throwable x) { - app.logEvent ("Error creating prototype: "+x); + } else if (list[i].endsWith (app.actionExtension) && tmpfile.length () > 0) { + try { + Action af = new Action (tmpfile, tmpname, proto); + updatables.put (list[i], af); + nact.put (tmpname, af); + } catch (Throwable x) { + app.logEvent ("Error creating prototype: "+x); + } + } else if (list[i].endsWith (app.skinExtension)) { + try { + SkinFile sf = new SkinFile (tmpfile, tmpname, proto); + updatables.put (list[i], sf); + nskins.put (tmpname, sf); + } catch (Throwable x) { + app.logEvent ("Error creating prototype: "+x); + } } } } - } // Create and register type properties file File propfile = new File (dir, "type.properties");