home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
decnamedia.tcl
< prev
next >
Wrap
Text File
|
1997-10-23
|
2KB
|
92 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)decnamedia.tcl /main/titanic/1
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)decnamedia.tcl /main/titanic/1 23 Oct 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
require illegalcha.tcl
# End user added include file section
Class DecNameDialog : {TemplateDialog} {
constructor
method destructor
method popUp
method handleTextModified
method handleOk
attribute sysVers
attribute qualItem
attribute fileType
attribute prevName
attribute illegalCharacters
attribute editor
}
constructor DecNameDialog {class this name} {
set this [TemplateDialog::constructor $class $this $name]
# Start constructor user section
interface DlgColumn $this.c {
Label message {
text Name:
}
SingleLineText name {
columnCount 30
}
}
$this.c.name textModified "$this handleTextModified"
$this config -okPressed "$this handleOk" \
-helpPressed {.main helpOnName askDecName} \
-modal 1
# End constructor user section
return $this
}
method DecNameDialog::destructor {this} {
# Start destructor user section
# End destructor user section
}
method DecNameDialog::popUp {this} {
global illegalCharacters
set itemType [file2itemtype [$this fileType]]
$this illegalCharacters $illegalCharacters($itemType)
$this.c.name text ""
$this handleTextModified
$this TemplateDialog::popUp
}
method DecNameDialog::handleTextModified {this} {
if { ("[$this illegalCharacters]" != "") && \
[regexp [$this illegalCharacters] [$this.c.name text]] } {
set cursorIndex [$this.c.name cursorIndex]
$this.c.name text [$this prevName]
$this.c.name cursorIndex [expr $cursorIndex - 1]
} else {
$this prevName [$this.c.name text]
}
if {"[rmWhiteSpace [$this.c.name text]]" == ""} {
$this okSensitive 0
} else {
$this okSensitive 1
}
$this okDefault [$this okSensitive]
$this cancelDefault [expr 1 - [$this okSensitive]]
}
method DecNameDialog::handleOk {this} {
[$this editor] decompose [$this sysVers] [$this qualItem] \
[$this.c.name text] [$this fileType]
}
# Do not delete this line -- regeneration end marker