home *** CD-ROM | disk | FTP | other *** search
- !!Script
- // Copyright ⌐ 1997-1998 - Modelworks Software
- // @Modify build 225 cm19981007 - added readOnly detection
-
- /**
- @Tool: newSubpackage~displays a dialog to let you add a folder
- in the source path of a package.
- @Image: New Subpackage Dialog@newSubpackage_Project.gif
- @EndTool:
- @Summary: newSubpackage~displays a dialog to let you add a folder
- */
-
- function DoUpdate(cmdUI)
- {
- var packageList = null;
- var project = getCurrentProject();
- if (project)
- {
- packageList = project.getPackageList()
- }
- cmdUI.enable(project && packageList && packageList.count > 0 && !project.readOnly) // cm19981007
- return true;
- }
-
- function DoCommand()
- {
- var project = getCurrentProject();
-
- if (project)
- {
- var file = chooseNewSubpackage();
- // Note you can not use the variable name "package"
- // because it is a reserve word in JavaScript
- }
- else
- {
- alert("A project must be open before you can create a subpackage");
- }
- }
-
-
- !!/Script
-