---++!! !AppHelper %TOC{title="Contents:"}% %STARTINCLUDE% ---++ 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 %T% __Sample Code__ <verbatim> NPL.load("(gl)script/kids/3DMapSystemApp/AppHelper.lua"); </verbatim> ---+++ Member Functions ---++++ !Map3DSystem.App.IP.AddActionFeed requires if(not Map3DSystem.App.AppHelper) then Map3DSystem.App.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__ <verbatim>function Map3DSystem.App.IP.AddActionFeed(msg)</verbatim> __parameters__ | *msg* | | ---++++ !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__ <verbatim>function Map3DSystem.App.worlddb.InstallApp(app_key)</verbatim> __parameters__ | *app* | | | *key* | | ---++++ !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__ <verbatim>function Map3DSystem.App.worlddb.RemoveApp(app_key)</verbatim> __parameters__ | *app* | | | *key* | | ---++++ !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__ <verbatim>function Map3DSystem.App.worlddb.LoadAppAttributes(app_key)</verbatim> __parameters__ | *app* | | | *key* | | ---++++ !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__ <verbatim>function Map3DSystem.App.worlddb.SaveAppAttributes(app_key, atts)</verbatim> __parameters__ | *app* | | | *key* | | | *atts* | | %STOPINCLUDE%
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
Ra
w
edit
|
M
ore topic actions
Topic revision: r1 - 2008-02-29
-
LiXizhi
Home
Site map
CCWeb web
HaqiTeen web
Main web
ParaEngine web
TWiki web
Main Web
Users
Groups
Index
Search
Changes
Notifications
RSS Feed
Statistics
导航页WebTopMenu
Preferences
开发指南
Getting Started
ParacraftSDK
NPL
MCML
NPL Reference Manual
美术Mod
Account
Log In
English
简体中文
簡體中文
E
dit
A
ttach
Copyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback