home *** CD-ROM | disk | FTP | other *** search
- #---------------------------------------------------------------------------
- #
- # (c) Cadre Technologies Inc. 1996
- #
- # File: @(#)newproploc.tcl 1.11
- # Author: <generated>
- # Description:
- #---------------------------------------------------------------------------
- # SccsId = @(#)newproploc.tcl 1.11 05 Apr 1996 Copyright 1996 Cadre Technologies Inc.
-
- # Start user added include file section
- # End user added include file section
-
- require "newcustobj.tcl"
-
- Class NewPropLocDialog : {NewCustObjectDialog} {
- constructor
- method destructor
- method popUp
- method handleOkPressed
- attribute editorArea
- }
-
- constructor NewPropLocDialog {class this name} {
- set this [NewCustObjectDialog::constructor $class $this $name]
- # Start constructor user section
- $this title "New Property Location"
- interface DlgColumn $this.DC {
- allowResize 1
- Label L {
- text "Property:"
- }
- BrowsView nameBV {
- rowCount 10
- columnCount 30
- selectionPolicy BROWSE
- mode DETAIL
- }
- }
- BrowsHeader new $this.DC.nameBV.shortBH -label Name -width 12
- BrowsHeader new $this.DC.nameBV.longBH -label "Long Name" -width 30
-
- $this helpPressed { .main helpOnName newPropLocation }
- $this okPressed "$this handleOkPressed"
-
- # End constructor user section
- return $this
- }
-
- method NewPropLocDialog::destructor {this} {
- # Start destructor user section
- # End destructor user section
- $this NewCustObjectDialog::destructor
- }
-
- method NewPropLocDialog::popUp {this} {
-
- set objs [$this.DC.nameBV objectSet]
-
- if [lempty $objs] {
- set dict [[$this editorArea] longName]
-
- foreach def [$dict names] {
- set objName $this.DC.nameBV.$def
- BrowsObject new $objName
- $objName smallIcon folder_16
- $objName label $def
- $objName details "\"[$dict set $def]\""
- $objName activated "$this handleOkPressed"
- }
-
- # sort on name
- $this.DC.nameBV sort -column $this.DC.nameBV.shortBH
-
- $this.DC.nameBV selectedSet [lindex [$this.DC.nameBV objectSet] 0]
- }
-
- $this TemplateDialog::popUp
- }
-
- method NewPropLocDialog::handleOkPressed {this} {
-
- set name [[$this.DC.nameBV selectedSet] label]
-
- if {$name == ""} {
- wmtkerror "Invalid selection."
- } else {
- $this popDown
- [.main editorArea] newObject $name [$this edit]
- }
- }
-
- # Do not delete this line -- regeneration end marker
-
-