AppHelper
A helper class for applications.
Title |
A helper class for applications. |
Author(s) |
LiXizhi |
Date |
2007/12/28 |
File |
script/kids/3DMapSystemApp/AppHelper.lua |
Description
Such as cross application messaging, integration points, etc
Sample Code
NPL.load("(gl)script/kids/3DMapSystemApp/AppHelper.lua");
Member Functions
Map3DSystem.App.IP.AddActionFeed
requires
if(not
AppHelper) then
AppHelper={}; end
integration points related.
if(not
Map3DSystem.App.IP) then
Map3DSystem.App.IP={}; end
add an application action feed to
ActionFeedBar. More info please see the
ActionFeedBar doc.
syntax
function Map3DSystem.App.IP.AddActionFeed(msg)
parameters
Map3DSystem.App.worlddb.InstallApp
client world database related.
if(not
Map3DSystem.App.worlddb) then
Map3DSystem.App.worlddb={}; end
UNTESTED: install an application to the current world's attribute table.
This will ensure the app is downloaded and installed before the world can be loaded.
it basically add an entry in the apps table of the clientworld.attribute.db
syntax
function Map3DSystem.App.worlddb.InstallApp(app_key)
parameters
Map3DSystem.App.worlddb.RemoveApp
UNTESTED: remove an application from the current world's attribute table
this will not make the app a prerequisites to run the world
syntax
function Map3DSystem.App.worlddb.RemoveApp(app_key)
parameters
Map3DSystem.App.worlddb.LoadAppAttributes
UNTESTED: load all attributes of a given application that is stored in the current world's attribute table
Note1: application attributes can be loaded or saved to the current world even when the application is not installed in the world.
Note2: this function will check the database each time. So call this once at application render box function.
return the application attribute table or nil
syntax
function Map3DSystem.App.worlddb.LoadAppAttributes(app_key)
parameters
Map3DSystem.App.worlddb.SaveAppAttributes
UNTESTED: save all attributes of a given application to the current world's attribute table
Note1: application attributes can be loaded or saved to the current world even when the application is not installed in the world.
Note2: this function will write to the database each time. So call this once at world saving time for each application.
syntax
function Map3DSystem.App.worlddb.SaveAppAttributes(app_key, atts)
parameters
Topic revision: r1 - 2008-02-29
- LiXizhi