diff nodejs/examples/mce/mainmenu.js @ 932:bd9b0142fc7e

Update the sample application. We can use the ./test5 to test it now. It will download the image from the VOD server and render it in the screen.
author wycc
date Tue, 09 Nov 2010 07:41:52 +0800
parents 30cd14b11bc7
children e45ad25a1462
line wrap: on
line diff
--- a/nodejs/examples/mce/mainmenu.js	Sun Nov 07 11:36:12 2010 +0800
+++ b/nodejs/examples/mce/mainmenu.js	Tue Nov 09 07:41:52 2010 +0800
@@ -6,13 +6,17 @@
 var animate=require("animate");
 var fs = require("fs");
 var EPG = require('./epg');
-
+/**
+ *   We will fetch the EPG file from the server and fetch all images required for the main category from it.
+ *   If these files are cached, we will not fetch it again. Otherwise, we will fetch them. The EPG class is
+ *   responsible for the cache management.
+ */
 function MainMenu(app) 
 {
     var self = this;
-    //var epg = new EPG.EPG();
-    //epg.registerInitDone(function() { self.init();});
-    self.init();
+    var epg = new EPG.EPG();
+    epg.registerInitDone(function() { self.init();});
+    //self.init();
 }
 MainMenu.prototype.init=function()
 {