home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
extldbobj.tcl
< prev
next >
Wrap
Text File
|
1997-10-16
|
3KB
|
138 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1997
#
# File: @(#)extldbobj.tcl /main/titanic/6
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)extldbobj.tcl /main/titanic/6 16 Oct 1997 Copyright 1996 Cayenne Software Inc.
# Start user added include file section
# End user added include file section
require "browsdbobj.tcl"
Class ExtLDbObj : {BrowsDbObj ExternalLink} {
method destructor
constructor
method promoter
method browserType
method changeLocation
method customLevelVersion
method editFile
method hasChildren
method makeUpToDate
method showFile
}
method ExtLDbObj::destructor {this} {
# Start destructor user section
# End destructor user section
$this BrowsDbObj::destructor
}
constructor ExtLDbObj {class this name} {
set this [ExternalLink::constructor $class $this $name]
set this [BrowsDbObj::constructor $class $this $name]
return $this
}
selfPromoter ExternalLink {this} {
ExtLDbObj promote $this
}
method ExtLDbObj::promoter {this} {
$this BrowsDbObj::promoter
module_promoter ExtLDbObj $this
}
proc ExtLDbObj::associations {} {
return {}
}
method ExtLDbObj::browserType {this} {
return "[$this type]"
}
method ExtLDbObj::changeLocation {this} {
ClassMaker::extend FileChooser ChangeLocationFileChooser dbObj
if $win95 {
set filter "All Files (*.*)|*|"
} else {
set filter "*"
}
ChangeLocationFileChooser new $wmttoolObj.changeLocation \
-title "Change Location" \
-selectionPolicy BROWSE \
-filter $filter \
-helpPressed {.main helpOnName changeLocation} \
-directory "[path_name directory [$this path]]" \
-selectedSet "[list [$this path]]" \
-dbObj $this \
-cancelPressed {%this delete} \
-okPressed {
set script \
"[%this dbObj] path [list [lindex [%this selectedSet] 0]]"
$wmttoolObj startCommand tcl "$script" "" "" {1 0} 1
%this delete
}
$wmttoolObj.changeLocation popUp
}
proc ExtLDbObj::childTypes {assoc} {
if {[lsearch -exact "[ExtLDbObj::associations]" "$assoc"] == -1} {
return ""
}
return "[BrowserProcs::childTypes $assoc]"
}
proc ExtLDbObj::controlledLists {} {
return ""
}
method ExtLDbObj::customLevelVersion {this} {
return [$this systemVersion]
}
method ExtLDbObj::editFile {this} {
if {! [file writable [$this path]]} {
$this showFile
return
}
set file [$this path]
$this edit
$wmttoolObj startM4Command editor "$file" "$this quit" "$file"
if {! [file exists $file]} {
wmtkwarning "File '$file' does not exist"
}
}
method ExtLDbObj::hasChildren {this} {
return 0
}
proc ExtLDbObj::infoProperties {} {
return [concat \
[BrowserProcs::infoProperties] \
{"Controlled Actions"} \
]
}
method ExtLDbObj::makeUpToDate {this} {
# dummy call to server
$this path [$this path]
}
method ExtLDbObj::showFile {this} {
set file [$this path]
if {! [file exists $file]} {
wmtkerror "File '$file' does not exist"
return
}
$wmttoolObj startM4Command viewer "$file" "" "$file"
}
# Do not delete this line -- regeneration end marker