DevelopersAppDev
description: 鍒涘缓寮€鍙戝叾浠栧簲鐢ㄧ▼搴忕殑搴旂敤绋嬪簭銆
Developers app for Paraworld
Title |
Developers app for Paraworld |
Author(s) |
LiXizhi |
Date |
2008/1/31 |
File |
script/kids/3DMapSystemApp/Developers/app_main.lua |
Description
Developers is an application to create, edit, submit other applications. Application developers can create a new application from several predefined template and submit applications to application directory.
db registration insert script
INSERT INTO apps VALUES (NULL, 'Developers_GUID', 'Developers', '1.0.0', 'http://www.paraengine.com/apps/Developers_v1.zip', 'YourCompany', 'enUS', 'script/kids/3DMapSystemApp/Developers/IP.xml', '', 'script/kids/3DMapSystemApp/Developers/app_main.lua', 'Map3DSystem.App.Developers.MSGProc', 1);
generate wiki doc from all npl source code to script/doc folder.
Map3DSystem.App.Commands.Call("Help.GenerateNPLWikiDoc");
generate wiki doc from all npl source code to script/doc folder.
Map3DSystem.App.Commands.Call("Help.GenerateNPLWikiDoc");
Sample Code
NPL.load("(gl)script/kids/3DMapSystemApp/Developers/app_main.lua");
Member Functions
Map3DSystem.App.Developers.OnConnection
requires
create class
commonlib.setfield("Map3DSystem.App.Developers", {});
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.Developers.OnConnection(app, connectMode)
parameters
app |
the object representing the current application in the IDE. |
connectMode |
|
Map3DSystem.App.Developers.OnDisconnection
Receives notification that the Add-in is being unloaded.
syntax
function Map3DSystem.App.Developers.OnDisconnection(app, disconnectMode)
parameters
Map3DSystem.App.Developers.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.Developers.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.Developers.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.Developers.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.Developers.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.Developers.OnRenderBox(mcmlData)
parameters
Map3DSystem.App.Developers.Navigate
called when the user wants to nagivate to the 3D world location relavent to this application
syntax
function Map3DSystem.App.Developers.Navigate()
Map3DSystem.App.Developers.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.Developers.GotoHomepage()
Map3DSystem.App.Developers.DoQuickAction
called when user clicks the quick action for this application.
syntax
function Map3DSystem.App.Developers.DoQuickAction()
Map3DSystem.App.Developers.OnActivateDesktop
Add terrain, sky and ocean button to the toolbar.
syntax
function Map3DSystem.App.Developers.OnActivateDesktop()
Map3DSystem.App.Developers.OnDeactivateDesktop
syntax
function Map3DSystem.App.Developers.OnDeactivateDesktop()
Map3DSystem.App.Developers.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.Developers.MSGProc(window, msg)
parameters
code behind page for ArtToolsPage.html
Title |
code behind page for ArtToolsPage.html |
Author(s) |
LiXizhi |
Date |
2008/9/3 |
File |
script/kids/3DMapSystemApp/Developers/ArtToolsPage.lua |
Description
some tools that the artists uses.
Sample Code
NPL.load("(gl)script/kids/3DMapSystemApp/Developers/ArtToolsPage.lua");
Member Functions
ArtToolsPage.OnInit
page event handlers
local page;
init
syntax
function ArtToolsPage.OnInit()
Author(s): Leio Zhang
Title |
Author(s): Leio Zhang |
Author(s) |
Leio Zhang |
Date |
2008/4/8 |
File |
script/kids/3DMapSystemApp/Developers/DevelopersWnd.lua |
Description
Sample Code
NPL.load("(gl)script/kids/3DMapSystemApp/Developers/DevelopersWnd.lua");
Map3DSystem.App.Developers.ShowWnd(app);
Member Functions
Map3DSystem.App.Developers.DevelopersWnd.SetDescription
set description of textfield
syntax
function Map3DSystem.App.Developers.DevelopersWnd.SetDescription(des)
parameters
code behind page for EmuUsersPage.html
Title |
code behind page for EmuUsersPage.html |
Author(s) |
LiXizhi |
Date |
2008/12/31 |
File |
script/kids/3DMapSystemApp/Developers/EmuUsersPage.lua |
Description
Sample Code
NPL.load("(gl)script/kids/3DMapSystemApp/Developers/EmuUsersPage.lua");
Member Functions
EmuUsersPage.OnInit
page event handlers
init
syntax
function EmuUsersPage.OnInit()
EmuUsersPage.OnClickStartEmuUsers
translate the file
syntax
function EmuUsersPage.OnClickStartEmuUsers()
EmuUsersPage.GenEmuUsers
generate emulation users near a center
syntax
function EmuUsersPage.GenEmuUsers(btnName, values)
parameters
module installer
Title |
module installer |
Author(s) |
LiXizhi |
Date |
2008/3/5 |
File |
script/kids/3DMapSystemApp/Developers/module_installer.lua |
Description
Sample Code
NPL.load("(gl)script/kids/3DMapSystemApp/Developers/module_installer.lua");
code behind page for ProToolsPage.html
Title |
code behind page for ProToolsPage.html |
Author(s) |
LiXizhi |
Date |
2008/9/3 |
File |
script/kids/3DMapSystemApp/Developers/ProToolsPage.lua |
Description
Sample Code
NPL.load("(gl)script/kids/3DMapSystemApp/Developers/ProToolsPage.lua");
Member Functions
ProToolsPage.OnInit
page event handlers
init
syntax
function ProToolsPage.OnInit()
a sample module file
Title |
a sample module file |
Author(s) |
LiXizhi |
Date |
2008/3/5 |
File |
script/kids/3DMapSystemApp/Developers/sample_module.lua |
Description
Sample Code
NPL.load("(gl)script/kids/3DMapSystemApp/Developers/sample_module.lua");
Member Functions
sample_modules.file1_post_func
this is an sample post processing function that replaces one string with another in the template file.
- param input : input file text string
- return __ : result file text string.
syntax
function sample_modules.file1_post_func(input)
parameters
input |
input file text string |
Title |
code behind page for TranslateFilePage.html |
Author(s) |
LiXizhi |
Date |
2008/8/28 |
File |
script/kids/3DMapSystemApp/Developers/TranslateFilePage.lua |
Description
Sample Code
NPL.load("(gl)script/kids/3DMapSystemApp/Developers/TranslateFilePage.lua");
Member Functions
TranslateFilePage.OnInit
page event handlers
init
syntax
function TranslateFilePage.OnInit()
TranslateFilePage.OnTranslateFile
the current translator
local translator;
translate the file
syntax
function TranslateFilePage.OnTranslateFile(btnName, values)
parameters
TranslateFilePage.OnWriteToSourceFile
write to the source code.
syntax
function TranslateFilePage.OnWriteToSourceFile()
TranslateFilePage.OnMachineTranslate
I used
http://translate.google.com to translate. it is basically http post
syntax
function TranslateFilePage.OnMachineTranslate()