home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
newproploc.tcl
< prev
next >
Wrap
Text File
|
1997-10-31
|
3KB
|
102 lines
#---------------------------------------------------------------------------
#
# (c) Cadre Technologies Inc. 1996
#
# File: @(#)newproploc.tcl /main/titanic/3
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)newproploc.tcl /main/titanic/3 31 Oct 1997 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} {
if [[$this editorArea] areaCleared] {
[$this editorArea] areaCleared 0
foreach objName [$this.DC.nameBV objectSet] {
$objName delete
}
}
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 [list [$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 [[lindex [$this.DC.nameBV selectedSet] 0] label]
if {$name == ""} {
wmtkerror "Invalid selection."
} else {
$this popDown
[.main editorArea] newObject $name [$this edit]
}
}
# Do not delete this line -- regeneration end marker