home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cadre Technologies Inc. 1996
- #
- # File: @(#)newobjectd.tcl 1.13
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)newobjectd.tcl 1.13 02 Apr 1996 Copyright 1996 Cadre Technologies Inc.
-
- # Start user added include file section
- # End user added include file section
-
- require "newcustobj.tcl"
-
- Class NewObjectDialog : {NewCustObjectDialog} {
- constructor
- method destructor
- method repTypeChanged
- }
-
- constructor NewObjectDialog {class this name} {
- set this [NewCustObjectDialog::constructor $class $this $name]
- # Start constructor user section
-
- $this title ObjectType
- $this okPressed {
- # only for ExternalFileTypes the browserType may vary
- if {[%this.DC.repObjectDDL selected] != "ExternalFileVersion" \
- && [%this.DC.repObjectDDL selected] != "ExternalLink"} {
-
- if {[lsearch [%this.DC.broObjectCB entrySet] \
- [%this.DC.broObjectCB text]] == -1 && \
- [%this.DC.broObjectCB text] != ""} {
- wmtkerror "Not a valid browserType specified."
- return
- }
- }
- %this popDown
- [.main editorArea] newObject [%this.DC.repObjectDDL selected]\
- [%this.DC.broObjectCB text] [%this edit]
- }
- interface DlgColumn $this.DC {
- allowResize 1
- Label L {
- text "Repository Type:"
- }
- DropDwnList repObjectDDL {
- entrySet {}
- rowCount 10
- }
- Label L {
- text "Browser Type:"
- }
- DropDwnComboBox broObjectCB {
- entrySet {all}
- rowCount 10
- }
- }
- $this helpPressed { .main helpOnName newObjectType }
-
- set sortedList [lsort [[.main BrowsObj] names]]
- $this.DC.repObjectDDL entrySet $sortedList
- $this.DC.repObjectDDL selected [lindex $sortedList 0]
-
- $this.DC.repObjectDDL selectionChanged "$this repTypeChanged"
-
- # End constructor user section
- return $this
- }
-
- method NewObjectDialog::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this NewCustObjectDialog::destructor
- }
-
- method NewObjectDialog::repTypeChanged {this} {
- set repType [$this.DC.repObjectDDL selected]
- set types [CustEditor::subTypes $repType]
- $this.DC.broObjectCB entrySet "all $types"
- $this.DC.broObjectCB text ""
- }
-
- # Do not delete this line -- regeneration end marker
-
-