EditAppsAppDev

description: 娣诲姞/鍒犻櫎绋嬪簭鐨勫簲鐢ㄧ▼搴

EditApps app for Paraworld

Title EditApps app for Paraworld
Author(s) LiXizhi
Date 2008/1/6
File script/kids/3DMapSystemApp/EditApps/app_main.lua

Description

Add/remove applications.

Call following applications.

db registration insert script INSERT INTO apps VALUES (NULL, 'EditApps_GUID', 'EditApps', '1.0.0', 'http://www.paraengine.com/apps/EditApps_v1.zip', 'YourCompany', 'enUS', 'script/kids/3DMapSystemApp/EditApps/IP.xml', '', 'script/kids/3DMapSystemApp/EditApps/app_main.lua', 'Map3DSystem.App.EditApps.MSGProc', 1);

TIP Sample Code

NPL.load("(gl)script/kids/3DMapSystemApp/EditApps/app_main.lua");

Member Functions

Map3DSystem.App.EditApps.OnConnection

requires

create class commonlib.setfield("Map3DSystem.App.EditApps", {});


event handlers

OnConnection method is the obvious point to place your UI (menus, mainbars, tool buttons) through which the user will communicate to the app. This method is also the place to put your validation code if you are licensing the add-in. You would normally do this before putting up the UI. If the user is not a valid user, you would not want to put the UI into the IDE.

  • param app : the object representing the current application in the IDE.
  • param connectMode : type of ConnectMode.

syntax

function Map3DSystem.App.EditApps.OnConnection(app, connectMode)

parameters

app the object representing the current application in the IDE.
connectMode  

Map3DSystem.App.EditApps.OnDisconnection

Receives notification that the Add-in is being unloaded.

syntax

function Map3DSystem.App.EditApps.OnDisconnection(app, disconnectMode)

parameters

app  
disconnectMode  

Map3DSystem.App.EditApps.OnQueryStatus

This is called when the command's availability is updated When the user clicks a command (menu or mainbar button), the QueryStatus event is fired. The QueryStatus event returns the current status of the specified named command, whether it is enabled, disabled, or hidden in the CommandStatus parameter, which is passed to the msg by reference (or returned in the event handler).

  • param commandName : The name of the command to determine state for. Usually in the string format "Category.SubCate.Name".
  • param statusWanted : what status of the command is queried. it is of type CommandStatusWanted
  • return __ : returns according to statusWanted. it may return an integer by adding values in CommandStatus.

syntax

function Map3DSystem.App.EditApps.OnQueryStatus(app, commandName, statusWanted)

parameters

app  
commandName The name of the command to determine state for. Usually in the string format "Category.SubCate.Name".
statusWanted  
return returns according to statusWanted. it may return an integer by adding values in CommandStatus.

Map3DSystem.App.EditApps.OnExec

This is called when the command is invoked.The Exec is fired after the QueryStatus event is fired, assuming that the return to the statusOption parameter of QueryStatus is supported and enabled. This is the event where you place the actual code for handling the response to the user click on the command.

  • param commandName : The name of the command to determine state for. Usually in the string format "Category.SubCate.Name".

syntax

function Map3DSystem.App.EditApps.OnExec(app, commandName, params)

parameters

app  
commandName The name of the command to determine state for. Usually in the string format "Category.SubCate.Name".
params  

Map3DSystem.App.EditApps.OnRenderBox

Change and render the 3D world with mcml data that is usually retrieved from the current user's profile page for this application.

syntax

function Map3DSystem.App.EditApps.OnRenderBox(mcmlData)

parameters

mcmlData  

Map3DSystem.App.EditApps.Navigate

called when the user wants to nagivate to the 3D world location relavent to this application

syntax

function Map3DSystem.App.EditApps.Navigate()

Map3DSystem.App.EditApps.GotoHomepage

called when user clicks to check out the homepage of this application. Homepage usually includes: developer info, support, developer worlds information, app global news, app updates, all community user rating, active users, trade, currency transfer, etc.

syntax

function Map3DSystem.App.EditApps.GotoHomepage()

Map3DSystem.App.EditApps.DoQuickAction

called when user clicks the quick action for this application.

syntax

function Map3DSystem.App.EditApps.DoQuickAction()

Map3DSystem.App.EditApps.MSGProc


client world database function helpers.


all related messages

APPS can be invoked in many ways: Through app Manager mainbar or menu command or buttons Command Line 3D World installed apps

syntax

function Map3DSystem.App.EditApps.MSGProc(window, msg)

parameters

window  
msg  

browse all applications from official site. Download and install applications to the current computer.

Title browse all applications from official site. Download and install applications to the current computer.
Author(s) LiXizhi
Date 2008/1/12
File script/kids/3DMapSystemApp/EditApps/BrowseAppsWnd.lua

Description

TIP Sample Code

NPL.load("(gl)script/kids/3DMapSystemApp/EditApps/BrowseAppsWnd.lua");
Map3DSystem.App.EditApps.ShowBrowseAppWnd(app);

Member Functions

Map3DSystem.App.EditApps.ShowBrowseAppWnd

common control library NPL.load("(gl)script/ide/common_control.lua");

commonlib.setfield("Map3DSystem.App.EditApps.BrowseAppsWnd", {});

the current logged in user's root bag object. of type EditApps.Bag UserBag = nil;

display the main inventory window for the current user.

syntax

function Map3DSystem.App.EditApps.ShowBrowseAppWnd(_app)

parameters

app  

Map3DSystem.App.EditApps.BrowseAppsWnd.Show

  • param bShow : boolean to show or hide. if nil, it will toggle current setting.
  • param __ :_parent: parent window inside which the content is displayed. it can be nil.

syntax

function Map3DSystem.App.EditApps.BrowseAppsWnd.Show(bShow, _parent, parentWindow)

parameters

bShow boolean to show or hide. if nil, it will toggle current setting.
parent  
parentWindow  

Map3DSystem.App.EditApps.BrowseAppsWnd.OnDestory

destory the control

syntax

function Map3DSystem.App.EditApps.BrowseAppsWnd.OnDestory()

Map3DSystem.App.EditApps.BrowseAppsWnd.OnClickSort

sorting the application list by a sort critria

syntax

function Map3DSystem.App.EditApps.BrowseAppsWnd.OnClickSort(treeNode)

parameters

treeNode  

Map3DSystem.App.EditApps.BrowseAppsWnd.OnClickApp

user clicked to edit an application node.

syntax

function Map3DSystem.App.EditApps.BrowseAppsWnd.OnClickApp(treeNode)

parameters

treeNode  

Map3DSystem.App.EditApps.BrowseAppsWnd.DrawAppNodeHandler

owner draw function to treeViewEditAppList

syntax

function Map3DSystem.App.EditApps.BrowseAppsWnd.DrawAppNodeHandler(_parent, treeNode)

parameters

parent  
treeNode  

add/remove/edit privacy settings for all installed applications of a given user

Title add/remove/edit privacy settings for all installed applications of a given user
Author(s) LiXizhi
Date 2008/1/12
File script/kids/3DMapSystemApp/EditApps/EditAppsWnd.lua

Description

TIP Sample Code

NPL.load("(gl)script/kids/3DMapSystemApp/EditApps/EditAppsWnd.lua");
Map3DSystem.App.EditApps.ShowEditAppWnd(app);

Member Functions

Map3DSystem.App.EditApps.ShowEditAppWnd

common control library NPL.load("(gl)script/ide/common_control.lua");

commonlib.setfield("Map3DSystem.App.EditApps.EditAppsWnd", {});

the current logged in user's root bag object. of type EditApps.Bag UserBag = nil;

display the main inventory window for the current user.

syntax

function Map3DSystem.App.EditApps.ShowEditAppWnd(_app)

parameters

app  

Map3DSystem.App.EditApps.EditAppsWnd.ShowInMCML

this function is called via mcml pe:custom control.

syntax

function Map3DSystem.App.EditApps.EditAppsWnd.ShowInMCML(params)

parameters

params  

Map3DSystem.App.EditApps.EditAppsWnd.Show

  • param bShow : boolean to show or hide. if nil, it will toggle current setting.
  • param __ :_parent: parent window inside which the content is displayed. it can be nil.

syntax

function Map3DSystem.App.EditApps.EditAppsWnd.Show(bShow, _parent, parentWindow)

parameters

bShow boolean to show or hide. if nil, it will toggle current setting.
parent  
parentWindow  

Map3DSystem.App.EditApps.EditAppsWnd.OnDestory

destory the control

syntax

function Map3DSystem.App.EditApps.EditAppsWnd.OnDestory()

Map3DSystem.App.EditApps.EditAppsWnd.SortApp

TODO: sort ctl.RootNode using some compare functions.

syntax

function Map3DSystem.App.EditApps.EditAppsWnd.SortApp()

Map3DSystem.App.EditApps.EditAppsWnd.OnClickApp

user clicked to edit an application node.

  • param treeNode : if nil it will deselect the current selection

syntax

function Map3DSystem.App.EditApps.EditAppsWnd.OnClickApp(treeNode)

parameters

treeNode if nil it will deselect the current selection

Map3DSystem.App.EditApps.EditAppsWnd.OnDeselectApp

call this function to deselect a selected node.

syntax

function Map3DSystem.App.EditApps.EditAppsWnd.OnDeselectApp(treeNode)

parameters

treeNode  

Map3DSystem.App.EditApps.EditAppsWnd.DrawAppNodeHandler

owner draw function to treeViewEditAppList

syntax

function Map3DSystem.App.EditApps.EditAppsWnd.DrawAppNodeHandler(_parent, treeNode)

parameters

parent  
treeNode  

Map3DSystem.App.EditApps.EditAppsWnd.OnClickUninstallApp

uninstall permanently

syntax

function Map3DSystem.App.EditApps.EditAppsWnd.OnClickUninstallApp(sCtrlName, nodePath)

parameters

sCtrlName  
nodePath  

Map3DSystem.App.EditApps.EditAppsWnd.OnClickAddRemoveApp

add or remove on startup.

syntax

function Map3DSystem.App.EditApps.EditAppsWnd.OnClickAddRemoveApp(sCtrlName, nodePath)

parameters

sCtrlName  
nodePath  
Topic revision: r1 - 2008-02-29 - LiXizhi
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2022 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback