home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
browseentr.tcl
< prev
next >
Wrap
Text File
|
1997-06-20
|
3KB
|
97 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1996
#
# File: @(#)browseentr.tcl /main/titanic/3
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)browseentr.tcl /main/titanic/3 20 Jun 1997 Copyright 1996 Cayenne Software Inc.
# Start user added include file section
require classmaker.tcl
require wmt_util.tcl
# End user added include file section
Class BrowseEntryDlg : {TemplateDialog} {
constructor
method destructor
method handleBrowse
method handleHelp
method popUp
attribute message
attribute entry
}
constructor BrowseEntryDlg {class this name} {
set this [TemplateDialog::constructor $class $this $name]
# Start constructor user section
interface DlgColumn $this.top {
Label nameLab {}
SingleLineText name {}
}
PushButton new $this.browse \
-label "Browse..." \
-activated "$this handleBrowse"
$this config \
-modal yes \
-helpPressed "$this handleHelp"
$this.top.name textModified {
[getParent [getParent %this]] entry [%this text]
}
# End constructor user section
return $this
}
method BrowseEntryDlg::destructor {this} {
# Start destructor user section
# End destructor user section
}
method BrowseEntryDlg::handleBrowse {this} {
set fileChooser .main.Browse[nt_get_type $this]
if {! [isCommand $fileChooser]} {
ClassMaker::extend FileChooser BrowseEntryDlgFileChooser dialog
if $win95 {
set filter "Programs|*.com;*.exe;*.bat;*.cmd|All Files (*.*)|*|"
} else {
set filter "*"
}
BrowseEntryDlgFileChooser new $fileChooser \
-title "Browse" \
-selectionPolicy EXTENDED \
-filter $filter \
-dialog $this \
-okPressed {
set cmdLine ""
foreach command [%this selectedSet] {
if {"$cmdLine" != ""} {
append cmdLine " [SystemUtilities::cmdSeparator] "
}
append cmdLine $command
}
set dialog [%this dialog]
$dialog entry $cmdLine
$dialog.top.name text [$dialog entry]
}
$fileChooser delHelpButton
}
$fileChooser popUp
}
method BrowseEntryDlg::handleHelp {this} {
[getParent $this] helpOnName [nt_get_type $this]
}
method BrowseEntryDlg::popUp {this} {
$this.top.nameLab text [$this message]
$this.top.name text [$this entry]
$this TemplateDialog::popUp
}
# Do not delete this line -- regeneration end marker