home *** CD-ROM | disk | FTP | other *** search
- !!script
- // Copyright ⌐ 1997-1998 - Modelworks Software
-
- /**
- @Tool: addPackage~displays a dialog to allow you to define a package source directory
- to add to the Browser. You can use addPackage to add a directory with any files types
- to the Browser by choosing the Custom package type in the dialog.
- @Image: Add Package Dialog@addPackage_ChoosePackage.gif
- @Paragraph: If you choose the custom type, you will also be asked by another dialog
- to define the source and destination file types for a custom package type. The
- format expected by the Custom file type dialog is
- <code>".<source extension type 1>.<destinatin extension type>"</code>.
- For example, to define a text file type you can define the source and destination
- files as <code>".txt.txt"</code>.
- @Image: Define Types Dialog@addPackage_DefineTypes.gif
- @See: Project@Script Reference\Objects\Project.html
- @Summary: addPackage~adds a Package object to the Browser
- @EndTool:
- */
-
- var output = getOutput();
-
- function DoCommand()
- {
- output.clear();
-
- var new_package =
- chooseNewPackage("Choose Package to add to Browser");
- // Note you can not use the variable name "package"
- // because it is a reserve word in JavaScript
-
- if (new_package)
- {
- Browser.addPackage(new_package);
- }
- }
-
- !!/script
-
-