org.symbian.tools.wrttools.previewer/preview/script/lib/widget.js
changeset 369 0a31422d2116
parent 303 a619b3ef3095
child 371 8c790948988d
--- a/org.symbian.tools.wrttools.previewer/preview/script/lib/widget.js	Thu Jun 10 11:52:23 2010 -0700
+++ b/org.symbian.tools.wrttools.previewer/preview/script/lib/widget.js	Thu Jun 10 17:06:55 2010 -0700
@@ -53,7 +53,7 @@
 		if (url) {
 			window.open(url, "New Widget Window", 'height=200 width=250');
 		}
-	}
+	};
 	
 	
 	/**
@@ -64,7 +64,7 @@
 	 */
 	widget.preferenceForKey = function(name){
 		return _BRIDGE_REF.nokia.helper.getPreference(name);
-	}
+	};
 	
 	
 	/**
@@ -76,7 +76,7 @@
 	 */
 	widget.setPreferenceForKey = function(preference, key){
 		_BRIDGE_REF.nokia.helper.setPreference(key, preference);
-	}
+	};
 	
 	
 	
@@ -88,7 +88,7 @@
 	 */
 	widget.setNavigationEnabled = function(bool){
 		//This function can not be used on preview browser
-	}
+	};
 	
 	
 	
@@ -100,8 +100,13 @@
 	 * @return {Void}
 	 */
 	widget.openApplication = function(Uid, param){
-		alert("openApplication function won't be simulated in this application");
-	}
+		if (Uid == 270501242) { // Camera
+			var help = _BRIDGE_REF.nokia.helper;
+			help.showCamera();
+		} else {
+			alert("openApplication function won't be simulated in this application");
+		}
+	};
 	
 	
 	
@@ -114,7 +119,7 @@
 	widget.prepareForTransition = function(transitionState){
 		this.isFront = ("" + transitionState).toLowerCase() != "toback";
 		window.document.getElementsByTagName("body")[0].style.opacity = "0.3";
-	}
+	};
 	
 	
 	
@@ -141,7 +146,7 @@
 			//do nothing
 		}, 50);
 		//do nothing
-	}
+	};
 	
 	
 	
@@ -163,7 +168,7 @@
 		} 
 		catch (e) {
 		}
-	}
+	};
 	
 	
 	
@@ -184,7 +189,7 @@
 		} 
 		catch (e) {
 		}
-	}
+	};
 	
 	/**
 	 * Allows the definition of a function to be called
@@ -195,7 +200,7 @@
 	 */
 	widget.onshow = function(){
 		// to be implemented
-	}
+	};
 	
 	
 	
@@ -209,7 +214,7 @@
 	 */
 	widget.onhide = function(){
 		// to be implemented
-	}
+	};
 	
 	
 	
@@ -242,7 +247,7 @@
 		catch (e) {
 			alert('Error in attachSysInfo: ' + e);
 		}
-	}
+	};
 	
 	/**
 	 * 
@@ -276,7 +281,7 @@
 		}else{
 			console.info("System API-1.0 Notice -- no listeners defined for eventType:"+eventType);
 		}
-	}
+	};
 	
 	//	make TRUE widget.js script loaded
 	window.parent.NOKIA.scriptsLoaded.widget = true;
@@ -300,4 +305,4 @@
 		_BRIDGE_REF.nokia.emulator.child = window;
 		_BRIDGE_REF.nokia.menu.init();
 	}	
-})()
+})();