home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cayenne Software Inc. 1997
- #
- # File: @(#)newcopydef.tcl /main/titanic/3
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)newcopydef.tcl /main/titanic/3 23 Oct 1997 Copyright 1997 Cayenne Software Inc.
-
- # Start user added include file section
- # End user added include file section
-
- require "newcustobj.tcl"
-
- Class NewCopyDefDialog : {NewCustObjectDialog} {
- constructor
- method destructor
- method popUp
- }
-
- constructor NewCopyDefDialog {class this name} {
- set this [NewCustObjectDialog::constructor $class $this $name]
- # Start constructor user section
- $this title "New Copy Specification"
- $this autoPopDown 0
- interface DlgColumn $this.col {
- Label typeLabel {
- text "File Type:"
- }
- ComboBox fileTypes {
- rowCount 10
- }
- }
-
- $this okPressed {
- set type [%this.col.fileTypes text]
- if { [[[.main editorArea] typeToGdr] set $type] != "" } {
- wmtkerror "A copy definition for '$type' already exists"
- } else {
- %this popDown
- [.main editorArea] newObject $type [%this edit]
- [.main editorArea] isChanged 1
- }
- }
-
- $this helpPressed {.main helpOnName newCopyspecs}
-
- $this checkList [list "$this.col.fileTypes textModified text"]
- # End constructor user section
- return $this
- }
-
- method NewCopyDefDialog::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this NewCustObjectDialog::destructor
- }
-
- method NewCopyDefDialog::popUp {this} {
- global BrowserProcs::diagramFileTypes
- set types "${BrowserProcs::diagramFileTypes} default"
- set unusedTypes {}
- foreach type $types {
- if { [[[.main editorArea] typeToGdr] set $type] == "" } {
- lappend unusedTypes $type
- }
- }
-
- $this.col.fileTypes entrySet $unusedTypes
- $this.col.fileTypes text ""
- $this TemplateDialog::popUp
- }
-
- # Do not delete this line -- regeneration end marker
-
-