home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
dirbrowser.tcl
< prev
next >
Wrap
Text File
|
1997-07-02
|
2KB
|
78 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)dirbrowser.tcl /main/titanic/2
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)dirbrowser.tcl /main/titanic/2 2 Jul 1997 Copyright 1997 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
require "dirselectd.tcl"
Class DirBrowser : {DirSelectDialog} {
method destructor
constructor
method selected
method createDir
attribute createButton
attribute current
}
method DirBrowser::destructor {this} {
# Start destructor user section
# End destructor user section
$this DirSelectDialog::destructor
}
# Create a director browser. If createButton
# is true, a "Create" button will be added, which
# allows the entered directory to be created.
#
constructor DirBrowser {class this name {createButton 0}} {
set this [DirSelectDialog::constructor $class $this $name]
$this config \
-okDefault 0 \
-cancelDefault 0 \
-current [pwd] \
-createButton $createButton
if $createButton {
PushButton new $this.create \
-label "Create" \
-activated "$this createDir"
}
return $this
}
# Returns or sets the selected directory.
#
method DirBrowser::selected {this {dir ""}} {
if {$dir == ""} {
return [$this directory]
}
$this directory $dir
}
method DirBrowser::createDir {this} {
$this handleOk
BasicFS::makeDir [$this directory]
$this updateTree
# MOTIF BUG: makeVisible scrolls the dialog
if [$this windows] {
$this makeVisible
}
}
# Do not delete this line -- regeneration end marker