Author: tom
Date: Tue Nov  4 14:48:24 2008
New Revision: 3280

URL: http://svn.slimdevices.com?rev=3280&root=Jive&view=rev
Log:
applet init work - use load+register strategy with loadPriority.lua

Modified:
    7.3/trunk/squeezeplay/src/squeezeplay/share/jive/AppletManager.lua

Modified: 7.3/trunk/squeezeplay/src/squeezeplay/share/jive/AppletManager.lua
URL: 
http://svn.slimdevices.com/7.3/trunk/squeezeplay/src/squeezeplay/share/jive/AppletManager.lua?rev=3280&root=Jive&r1=3279&r2=3280&view=diff
==============================================================================
--- 7.3/trunk/squeezeplay/src/squeezeplay/share/jive/AppletManager.lua 
(original)
+++ 7.3/trunk/squeezeplay/src/squeezeplay/share/jive/AppletManager.lua Tue Nov  
4 14:48:24 2008
@@ -190,19 +190,6 @@
                return nil
        end
        return resOrErr
-end
-
-
--- _loadMetas
--- loads the meta-information of all applets
-local function _loadMetas()
-       log:debug("_loadMetas")
-
-       for name, entry in pairs(getSortedAppletDb(_appletsDb)) do
-               if not entry.metaLoaded then
-                       _ploadMeta(entry)
-               end
-       end
 end
 
 
@@ -282,7 +269,7 @@
 end
 
 
-local function _pevalMeta(entry)
+local function _pregisterMeta(entry)
        if entry.metaLoaded and not entry.metaRegistered then
                local ok, resOrErr = pcall(_registerMeta, entry)
                if not ok then
@@ -297,15 +284,25 @@
        return true
 end
 
-
+-- _loadAndRegisterMetas
+-- loads and registers the meta-information of all applets
+local function _loadAndRegisterMetas()
+       log:debug("_loadAndRegisterMetas")
+
+       for name, entry in pairs(getSortedAppletDb(_appletsDb)) do
+               if not entry.metaLoaded then
+                       _ploadMeta(entry)
+                       if not entry.metaRegistered then
+                               _pregisterMeta(entry)
+                       end
+               end
+       end
+
+end
 -- _evalMetas
 -- evaluates the meta-information of all applets
 local function _evalMetas()
        log:debug("_evalMetas")
-
-       for name, entry in pairs(getSortedAppletDb(_appletsDb)) do
-               _pevalMeta(entry)
-       end
 
        for name, entry in pairs(getSortedAppletDb(_appletsDb)) do
                if entry.metaLoaded and not entry.metaConfigured then
@@ -346,7 +343,7 @@
        log:debug("AppletManager:loadApplets")
 
        _findApplets()
-       _loadMetas()
+       _loadAndRegisterMetas()
        _evalMetas()
 end
 

_______________________________________________
Jive-checkins mailing list
[email protected]
http://lists.slimdevices.com/cgi-bin/mailman/listinfo/jive-checkins

Reply via email to