AssetsAppDev

description: 鐢ㄦ埛鍙互涓婁紶鍜屼娇鐢ㄥ浘鐗囩浉鍐屻€?D妯″瀷锛屽苟鍜屾湅鍙嬪叡浜€傜敤鎴峰彲浠ュ皢鍥剧墖鍜?D妯″瀷鏈夐€夋嫨鐨勫姞鍏ュ埌鑷繁鐨勫垱浣滃伐鍏锋爮涓紝鍦?D涓栫晫涓娇鐢ㄣ€傚簲鐢ㄧ▼搴忓紑鍙戣€呬篃鍙互灏嗚祫婧愬彂甯冨埌鑷繁鐨勫簲鐢ㄧ▼搴忛椤碉紝鎺ㄨ崘缁欏簲鐢ㄧ▼搴忕殑鐢ㄦ埛銆

Contents:

Assets app for Paraworld

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

Description

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

TIP Sample Code

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

Member Functions

Map3DSystem.App.Assets.OnConnection

requires

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


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.Assets.OnConnection(app, connectMode)

parameters

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

Map3DSystem.App.Assets.OnDisconnection

Receives notification that the Add-in is being unloaded.

syntax

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

parameters

app  
disconnectMode  

Map3DSystem.App.Assets.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.Assets.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.Assets.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.Assets.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.Assets.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.Assets.OnRenderBox(mcmlData)

parameters

mcmlData  

Map3DSystem.App.Assets.Navigate

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

syntax

function Map3DSystem.App.Assets.Navigate()

Map3DSystem.App.Assets.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.Assets.GotoHomepage()

Map3DSystem.App.Assets.DoQuickAction

called when user clicks the quick action for this application.

syntax

function Map3DSystem.App.Assets.DoQuickAction()

Map3DSystem.App.Assets.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.Assets.MSGProc(window, msg)

parameters

window  
msg  

asset definition for asset, folder, package

Title asset definition for asset, folder, package
Author(s) LiXizhi
Date 2008/1/31
File script/kids/3DMapSystemApp/Assets/AssetData.lua

Description

TIP Sample Code

NPL.load("(gl)script/kids/3DMapSystemApp/Assets/AssetData.lua");
-- only included in asset manager

Member Functions

Map3DSystem.App.Assets.asset:new

 common control library
NPL.load("(gl)script/ide/common_control.lua");
---- requires its Map3DSystem.UI.Creation.GetObjParamsFromAsset
NPL.load("(gl)script/kids/3DMapSystemUI/InGame/Creation.lua");

 requires its Map3DSystem.UI.Creator.GetObjParamsFromAsset
NPL.load("(gl)script/kids/3DMapSystemUI/Creator/Main.lua");

Map3DSystem.App.Assets.AssetStatus = {
   -- only a local copy of the asset
   Local = nil,
   -- a remote reference of the asset. The asset is not found in local disk
   Remote = 1,
   -- local and remote copy are identical
   Sync = 2,
   -- there is a difference between local copy and remote copy. Either overwrite from remote or update to remote. 
   Diff = 3,
};

 a mapping from predefined category prefix to category text. 
Map3DSystem.App.Assets.CategoryMap = {
   ["Creations.BCS.doors"] = "鍒涘缓.寤虹瓚閮ㄤ欢.闂?,
   ["Creations.NormalModels.trees"] = "鍒涘缓.妯″瀷.鏍?,
   -- TODO: add more here: this should be the same as in the main bar
}

--------------------------------------
 an asset template
--------------------------------------
Map3DSystem.App.Assets.asset = {
   -- model or texture relative-to-root file path, this is the only required field. 
   filename = nil, 
   -- text to be displayed. if nil, default to ParaIO.GetFileName(filename)
   text = nil, 
   -- default to "<filepath>.png", if filepath is not an image file.
   icon = nil,
   Price = nil,
   Reserved1 = nil,
   Reserved2 = nil,
   Reserved3 = nil,
   Reserved4 = nil,
}
;

create a new asset. the asset's filename must not be nil.

syntax

function Map3DSystem.App.Assets.asset:new(o)

parameters

o  

Map3DSystem.App.Assets.asset:ToItem

convert this asset to the item format. item format is the internal format used by the Creator integration point.

syntax

function Map3DSystem.App.Assets.asset:ToItem()   

Map3DSystem.App.Assets.asset:getModelParams

it will return the objParams if it is a model or character asset, otherwise it will return nil.

syntax

function Map3DSystem.App.Assets.asset:getModelParams()   

Map3DSystem.App.Assets.asset:getImageFile

it will return the image file name if it is a texture asset, otherwise it will return nil.

syntax

function Map3DSystem.App.Assets.asset:getImageFile()   

Map3DSystem.App.Assets.folder:new

--------------------------------------
 a folder template
--------------------------------------
Map3DSystem.App.Assets.folder = {
   -- working directory of the folder. this is the only required field. it should ends with /
   filename = nil, 
   -- a string or an array of strings. each one is a file extension. 
   fileExt = {"*.x", "*.xml", "*.png", "*.jpg",},
}
;

create a new asset. the asset's filename must not be nil.

syntax

function Map3DSystem.App.Assets.folder:new(o)

parameters

o  

Map3DSystem.App.Assets.Package:new

create a new Package

syntax

function Map3DSystem.App.Assets.Package:new(o)

parameters

o  

Map3DSystem.App.Assets.Package:ClearAll

clear all objects

syntax

function Map3DSystem.App.Assets.Package:ClearAll()

Map3DSystem.App.Assets.Package:AddAsset

add a new asset to the asset list. if the asset.filename already exist, it will update the existing one. return the asset and its index in the package

syntax

function Map3DSystem.App.Assets.Package:AddAsset(asset)

parameters

asset  

Map3DSystem.App.Assets.Package:RemoveAsset

remove an asset from the package by a given asset filename

syntax

function Map3DSystem.App.Assets.Package:RemoveAsset(filename)

parameters

filename  

Map3DSystem.App.Assets.Package:GetAsset

get an asset from the package by a given asset filename return the asset and its index in the package. return nil,nil if not found.

syntax

function Map3DSystem.App.Assets.Package:GetAsset(filename)

parameters

filename  

Map3DSystem.App.Assets.Package:AddFolder

add a new folder to the folder list. if the folder.filename already exist, it will update the existing one. return the folder and its index in the package

syntax

function Map3DSystem.App.Assets.Package:AddFolder(folder)

parameters

folder  

Map3DSystem.App.Assets.Package:RemoveFolder

remove an folder from the package by a given folder filename

syntax

function Map3DSystem.App.Assets.Package:RemoveFolder(filename)

parameters

filename  

Map3DSystem.App.Assets.Package:GetFolder

get an folder from the package by a given folder filename return the folder and its index in the package. return nil,nil if not found.

syntax

function Map3DSystem.App.Assets.Package:GetFolder(filename)

parameters

filename  

Advanced asset manager window

Title Advanced asset manager window
Author(s) LiXizhi
Date 2008/1/31
File script/kids/3DMapSystemApp/Assets/AssetManager.lua

Description

TIP Sample Code

NPL.load("(gl)script/kids/3DMapSystemApp/Assets/AssetManager.lua");
Map3DSystem.App.Assets.ShowAssetManager(_app)

Member Functions

Map3DSystem.App.Assets.AddPackage

common control library NPL.load("(gl)script/ide/common_control.lua"); commonlib.setfield("Map3DSystem.App.Assets.AssetManager", {});

NPL.load("(gl)script/kids/3DMapSystemApp/Assets/AssetData.lua"); NPL.load("(gl)script/kids/3DMapSystemApp/Assets/AssetProvider.lua");

a list of packages to be displayed by the current asset manager window AssetManager.Packages = {}; the currently selected package CurPak = nil;

add package to the package list. It does not update UI.

syntax

function Map3DSystem.App.Assets.AddPackage(package)

parameters

package  

Map3DSystem.App.Assets.ShowAssetManager


UI stuffs
display the package window.

syntax

function Map3DSystem.App.Assets.ShowAssetManager(_app)

parameters

app  

Map3DSystem.App.Assets.AssetManager.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.Assets.AssetManager.Show(bShow, _parent, parentWindow)

parameters

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

Map3DSystem.App.Assets.AssetManager.DrawAssetsNodeHandler

owner draw function to treeViewAssetsNodeList

syntax

function Map3DSystem.App.Assets.AssetManager.DrawAssetsNodeHandler(_parent, treeNode)

parameters

parent  
treeNode  

Map3DSystem.App.Assets.AssetManager.OnDestroy

destory the control

syntax

function Map3DSystem.App.Assets.AssetManager.OnDestroy()

Map3DSystem.App.Assets.AssetManager.UpdateComboBoxSelectPkg


update UI functions

update the select package combo box

syntax

function Map3DSystem.App.Assets.AssetManager.UpdateComboBoxSelectPkg()

Map3DSystem.App.Assets.AssetManager.RebuildAssetsTreeView

private: rebuild the package tree view according to the current package 's assets

syntax

function Map3DSystem.App.Assets.AssetManager.RebuildAssetsTreeView()

Map3DSystem.App.Assets.SelectPackage


methods

select a package as the current package and display its AssetManager. when a package is (de)selected, it will (un)hook object creation events.

  • param package : the package object to be selected. if nil, nothing will be selected.

syntax

function Map3DSystem.App.Assets.SelectPackage(package)

parameters

package the package object to be selected. if nil, nothing will be selected.

Map3DSystem.App.Assets.AssetManager.OnClickCreatePackage


tree view event handlers
user clicked to create a new package

syntax

function Map3DSystem.App.Assets.AssetManager.OnClickCreatePackage()

Map3DSystem.App.Assets.AssetManager.OnSelectPackage

user clicked to display a given package

syntax

function Map3DSystem.App.Assets.AssetManager.OnSelectPackage(sCtrlName, item)

parameters

sCtrlName  
item  

Map3DSystem.App.Assets.AssetManager.AddNewAsset

user clicks to add a new asset to the current package

syntax

function Map3DSystem.App.Assets.AssetManager.AddNewAsset()

Map3DSystem.App.Assets.AssetManager.AddNewFolder

user clicks to add a new folder.

syntax

function Map3DSystem.App.Assets.AssetManager.AddNewFolder()

Map3DSystem.App.Assets.AssetManager.OnClickAssetsNode

user clicked to edit or show an asset node.

syntax

function Map3DSystem.App.Assets.AssetManager.OnClickAssetsNode(treeNode)

parameters

treeNode  

Map3DSystem.App.Assets.AssetManager.OnClickDeleteAssetNode

user clicks to delete an asset node

syntax

function Map3DSystem.App.Assets.AssetManager.OnClickDeleteAssetNode(sCtrlName, nodePath)

parameters

sCtrlName  
nodePath  

Map3DSystem.App.Assets.AssetManager.OnClickRefreshAssetNode

user clicks to refresh an asset node

syntax

function Map3DSystem.App.Assets.AssetManager.OnClickRefreshAssetNode(sCtrlName, nodePath)

parameters

sCtrlName  
nodePath  

Map3DSystem.App.Assets.AssetManager.OnClickDeleteFolderNode

user clicks to delete an asset node

syntax

function Map3DSystem.App.Assets.AssetManager.OnClickDeleteFolderNode(sCtrlName, nodePath)

parameters

sCtrlName  
nodePath  

Map3DSystem.App.Assets.AssetManager.OnClickRefreshFolderNode

user clicks to refresh a folder or directory node

  • param bDoNotUpdate : if true ctl:Update() is not called.

syntax

function Map3DSystem.App.Assets.AssetManager.OnClickRefreshFolderNode(sCtrlName, nodePath, bDoNotUpdate)

parameters

sCtrlName  
nodePath  
bDoNotUpdate if true ctl:Update() is not called.

Map3DSystem.App.Assets.AssetManager.RefreshFolderNode

refresh a given folder or directory node.

  • param bRefreshChild : whether to refresh child node. return true if refreshed

syntax

function Map3DSystem.App.Assets.AssetManager.RefreshFolderNode(node, bRefreshChild)

parameters

node  
| bRefreshChild | whether to refresh child node. return true if refreshed |

Map3DSystem.App.Assets.AssetManager.OnClickFullExpandFolderNode

refresh all child nodes.

syntax

function Map3DSystem.App.Assets.AssetManager.OnClickFullExpandFolderNode(sCtrlName, nodePath)

parameters

sCtrlName  
nodePath  

Map3DSystem.App.Assets.AssetManager.OnClickToggleFolderNode

toggle display. it will refresh node on nodes that does not have children. so that folder hierachy is dynamically built with user interactions.

syntax

function Map3DSystem.App.Assets.AssetManager.OnClickToggleFolderNode(sCtrlName, nodePath)

parameters

sCtrlName  
nodePath  

Map3DSystem.App.Assets.AssetManager.OnCheckFileNode

user checks a file in the folder to include/exclude from the assets

syntax

function Map3DSystem.App.Assets.AssetManager.OnCheckFileNode(sCtrlName, nodePath)

parameters

sCtrlName  
nodePath  

Map3DSystem.App.Assets.AssetManager.OnClickEditPackage

user clicks to edit the current package

syntax

function Map3DSystem.App.Assets.AssetManager.OnClickEditPackage()

Map3DSystem.App.Assets.AssetManager.OnClickSavePackage

user clicks to save the current package save the package to file and optional publish it to app server.

syntax

function Map3DSystem.App.Assets.AssetManager.OnClickSavePackage()

Providing asset data from file or remote server

Title Providing asset data from file or remote server
Author(s) LiXizhi
Date 2008/1/31
File script/kids/3DMapSystemApp/Assets/AssetProvider.lua

Description

TIP Sample Code

NPL.load("(gl)script/kids/3DMapSystemApp/Assets/AssetProvider.lua");
-- only included in asset manager

Member Functions

Map3DSystem.App.Assets.CreatePackage

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

create a new package. One can later call SelectPackage to select it by UI.

  • param package : partial class of Map3DSystem.App.Assets.Package. if package is nil, a default one at the current player position will be created. otherwise, the caller can specify where to create the package and how big is the construction site.
  • return return : the package object created.

syntax

function Map3DSystem.App.Assets.CreatePackage(package)

parameters

| package | partial class of Map3DSystem.App.Assets.Package. if package is nil, a default one at the current player position will be created. otherwise, the caller can specify where to create the package and how big is the construction site. |

Map3DSystem.App.Assets.LoadPackageFromFile

load package from file. it returned the package object. it may return nil if failed.

syntax

function Map3DSystem.App.Assets.LoadPackageFromFile(filename)

parameters

filename  

Map3DSystem.App.Assets.LoadAllLocalPackages

local all local packages in the asset application directory to Map3DSystem.App.Assets.Packages array

syntax

function Map3DSystem.App.Assets.LoadAllLocalPackages()

Map3DSystem.App.Assets.SaveAsLocalPackage

save a local package in the asset application directory

  • param filename : if nil, the package.Category + ".asset" is used as the file name
  • return return : the filename if succeed, otherwise return nil.

syntax

function Map3DSystem.App.Assets.SaveAsLocalPackage(package, filename)

parameters

package  
filename if nil, the package.Category + ".asset" is used as the file name

asset view control: For previewing and editing asset properties. it is shown on the right side of asset manager window

Title asset view control: For previewing and editing asset properties. it is shown on the right side of asset manager window
Author(s) LiXizhi
Date 2008/1/31
File script/kids/3DMapSystemApp/Assets/AssetViewCtl.lua

Description

TIP Sample Code

NPL.load("(gl)script/kids/3DMapSystemApp/Assets/AssetViewCtl.lua");
Map3DSystem.App.Assets.AssetViewCtl.Show(_parent)
Map3DSystem.App.Assets.AssetViewCtl.Update(asset)

Member Functions

Map3DSystem.App.Assets.AssetViewCtl.Show

the current binding local bindingContext;

display the preview control.

syntax

function Map3DSystem.App.Assets.AssetViewCtl.Show(_parent)

parameters

parent  

Map3DSystem.App.Assets.AssetViewCtl.Update

binding an asset object to the AssetViewCtl

syntax

function Map3DSystem.App.Assets.AssetViewCtl.Update(asset)

parameters

asset  

Map3DSystem.App.Assets.AssetViewCtl.OnClickAddToScene


event handlers

User clicks to add the current object to the scene

syntax

function Map3DSystem.App.Assets.AssetViewCtl.OnClickAddToScene()

Map3DSystem.App.Assets.AssetViewCtl.OnClickSaveThumbNail

User clicks to create a thumbnail image for the current asset

syntax

function Map3DSystem.App.Assets.AssetViewCtl.OnClickSaveThumbNail()

create and edit package dialog.

Title create and edit package dialog.
Author(s) LiXizhi
Date 2008/1/31
File script/kids/3DMapSystemApp/Assets/DlgPackage.lua

Description

TIP Sample Code

NPL.load("(gl)script/kids/3DMapSystemApp/Assets/DlgPackage.lua");
Map3DSystem.App.Assets.ShowCreatePackageDlg()
Map3DSystem.App.Assets.ShowEditPackageDlg(package)

Member Functions

Map3DSystem.App.Assets.ShowCreatePackageDlg

current package binding context local bindingContext;

show the create package dialog

syntax

function Map3DSystem.App.Assets.ShowCreatePackageDlg()

Map3DSystem.App.Assets.ShowEditPackageDlg

show the edit package dialog

syntax

function Map3DSystem.App.Assets.ShowEditPackageDlg(package)

parameters

package  

Map3DSystem.App.Assets.CreateEditPackageDlg

create the dialog

syntax

function Map3DSystem.App.Assets.CreateEditPackageDlg(_parent)

parameters

parent  

code behind page for ModelBrowserPage.html

Title code behind page for ModelBrowserPage.html
Author(s) LiXizhi
Date 2008/4/25
File script/kids/3DMapSystemApp/Assets/ModelBrowserPage.lua

Description

pick an model and add it to scene.

TIP Sample Code

NPL.load("(gl)script/kids/3DMapSystemApp/Assets/ModelBrowserPage.lua");

Member Functions

ModelBrowserPage.OnInit

require to use Map3DSystem.App.Assets.asset NPL.load("(gl)script/kids/3DMapSystemApp/Assets/AssetData.lua"); NPL.load("(gl)script/ide/Encoding.lua");

local ModelBrowserPage = {}; commonlib.setfield("Map3DSystem.App.Assets.ModelBrowserPage", ModelBrowserPage)


page event handlers

first time init page

syntax

function ModelBrowserPage.OnInit()

ModelBrowserPage.OnSelectFile

User clicks a file

syntax

function ModelBrowserPage.OnSelectFile(name, filepath)

parameters

name  
filepath  

ModelBrowserPage.OnDoubleClickFile

user doublle clicks a file, it will select it and add it to scene.

syntax

function ModelBrowserPage.OnDoubleClickFile(name, filepath)

parameters

name  
filepath  

ModelBrowserPage.OnSelectFolder

user selects a new folder

syntax

function ModelBrowserPage.OnSelectFolder(name, folderPath)

parameters

name  
folderPath  

ModelBrowserPage.OnSelectFilter

user selects a new filter

syntax

function ModelBrowserPage.OnSelectFilter(name, filter)

parameters

name  
filter  

ModelBrowserPage.OnClickAddToScene

add the current model to file.

syntax

function ModelBrowserPage.OnClickAddToScene()

ModelBrowserPage.OnClickAddToScene_internal

private function

  • param silentMode : : if true no UI alert is displayed.

syntax

function ModelBrowserPage.OnClickAddToScene_internal(silentMode)

parameters

silentMode if true no UI alert is displayed.

ModelBrowserPage.OnClickRefreshPreview

refresh the current page.

syntax

function ModelBrowserPage.OnClickRefreshPreview()

ModelBrowserPage.OnClickRefreshPreview_Internal

private function

  • param silentMode : : if true no UI alert is displayed.

syntax

function ModelBrowserPage.OnClickRefreshPreview_Internal(silentMode)

parameters

silentMode if true no UI alert is displayed.

Map3DSystem.App.Assets.ModelBrowserPage.OnClickTakeSnapShot

take snapshot

syntax

function Map3DSystem.App.Assets.ModelBrowserPage.OnClickTakeSnapShot()

code behind page for PackageMakerPage.html

Title code behind page for PackageMakerPage.html
Author(s) LiXizhi
Date 2008/5/6
File script/kids/3DMapSystemApp/Assets/PackageMakerPage.lua

Description

make a zip package

TIP Sample Code

NPL.load("(gl)script/kids/3DMapSystemApp/Assets/PackageMakerPage.lua");

Member Functions

PackageMakerPage.OnInit


page event handlers

first time init page

syntax

function PackageMakerPage.OnInit()

PackageMakerPage.OnCreatePackage

Create package

syntax

function PackageMakerPage.OnCreatePackage(name, values)

parameters

name  
values  

PackageMakerPage.OnCreatePackage_imp

return true if created successfully

syntax

function PackageMakerPage.OnCreatePackage_imp(filepath,packageName,packagePath,packageVersion)

parameters

filepath  
packageName  
packagePath  
packageVersion  

PackageMakerPage.OnSelectFile

User clicks a file

syntax

function PackageMakerPage.OnSelectFile(name, filepath)

parameters

name  
filepath  

PackageMakerPage.OnSelectFolder

user selects a new folder

syntax

function PackageMakerPage.OnSelectFolder(name, folderPath)

parameters

name  
folderPath  

PackageMakerPage.OnSelectFilter

user selects a new filter

syntax

function PackageMakerPage.OnSelectFilter(name, filter)

parameters

name  
filter  

PackageMakerPage.OnCreateFileNode

when a file node created. we can modify its display to give some hints, such as 1. whether the file is being used by the system or not. 1. whether the file is previously included by the system or not

syntax

function PackageMakerPage.OnCreateFileNode(name, treeNode, filepath)

parameters

name  
treeNode  
filepath  

PackageMakerPage.OnClickRefreshFileInUse

refresh the file currently in used.

syntax

function PackageMakerPage.OnClickRefreshFileInUse(name, values)

parameters

name  
values  

PackageMakerPage.GetPrintList

鑾峰彇瑕佹墦鍗扮殑鍒楄〃

syntax

function PackageMakerPage.GetPrintList()

PackageMakerPage.UpdateFloderMembersTreeView

鏄剧ず閫変腑鏂囦欢澶逛腑 琚紩鎿庝娇鐢ㄧ殑鏂囦欢

syntax

function PackageMakerPage.UpdateFloderMembersTreeView()

PackageMakerPage.LoadTxtPathList

鍔犺浇鍘嬬缉鍖呯殑鏂囨湰閰嶇疆鏂囦欢

syntax

function PackageMakerPage.LoadTxtPathList()

PackageMakerPage.ImportFileTabitemOnclick


ImportFileTabitemOnclick

syntax

function PackageMakerPage.ImportFileTabitemOnclick()

PackageMakerPage.import_LoadTxtPathList

瀵煎叆鏂囨湰鏂囦欢

syntax

function PackageMakerPage.import_LoadTxtPathList()

PackageMakerPage.CutFilter

杞崲閫氶厤绗?*.*"

syntax

function PackageMakerPage.CutFilter(path)

parameters

path  

PackageMakerPage.GenerateGreaterCFByField

generate a greater compare function according to a node field name.

  • param fieldName : the name of the field, such as "Text", "Name", etc

syntax

function PackageMakerPage.GenerateGreaterCFByField(fieldName)

parameters

fieldName the name of the field, such as "Text", "Name", etc

PackageMakerPage.BuildPackageByGroupPath

-------------------------------------------------------------------------
   * _param_ __txtPathList__ :涓€涓枃鏈矾寰勭殑闆嗗悎 {"a/b/1.txt","a/b/2.txt",}
   * _param_ __zipPath__ :鐢熸垚鍘嬬缉鍖呯殑璺緞 c/d/test.zip
[[
NPL.load("(gl)script/kids/3DMapSystemApp/Assets/PackageMakerPage.lua");
local txtPathList = {
   "packages/redist/1-1.0.txt",
   "packages/redist/2-1.0.txt",
   "packages/redist/3-1.0.txt"
}
local zipPath = "packages/redist/test.zip"; local PackageMakerPage = PackageMakerPage; BuildPackageByGroupPath(txtPathList,zipPath) ]]

syntax

function PackageMakerPage.BuildPackageByGroupPath(txtPathList,zipPath)

parameters

txtPathList 涓€涓枃鏈矾寰勭殑闆嗗悎 {"a/b/1.txt","a/b/2.txt",}
zipPath  
Topic revision: r1 - 2008-02-29 - LiXizhi
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 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