home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
uenvbrobje.tcl
< prev
next >
Wrap
Text File
|
1996-10-18
|
3KB
|
109 lines
#---------------------------------------------------------------------------
#
# (c) Cadre Technologies Inc. 1996
#
# File: @(#)uenvbrobje.tcl /main/hindenburg/6
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)uenvbrobje.tcl /main/hindenburg/6 18 Oct 1996 Copyright 1996 Cadre Technologies Inc.
# Start user added include file section
# End user added include file section
Class UEnvBrObject : {BrowsObject} {
constructor
method destructor
method fileName
method update
method show
attribute fileV
attribute configV
attribute path
}
constructor UEnvBrObject {class this name fileV configV path} {
set this [BrowsObject::constructor $class $this $name]
$this fileV $fileV
$this configV $configV
$this path $path
# Start constructor user section
$this label $path
$this activated { %this show }
$this update
# End constructor user section
return $this
}
method UEnvBrObject::destructor {this} {
# Start destructor user section
# End destructor user section
}
proc UEnvBrObject::headerLabels {} {
return {File Object Version Status Owner Size Project ConfigVersion}
}
method UEnvBrObject::fileName {this} {
set file [[$this fileV] file]
set name [$file qualifiedName].[$file type]
}
method UEnvBrObject::update {this} {
set fileV [$this fileV]
set configV [$this configV]
set path [$this path]
if ![catch {file stat $path stat}] {
set size $stat(size)
} else {
set size "<unknown>"
}
if [catch {set owner [BasicFS::owner $path]}] {
set owner "<unknown>"
}
$this details [list \
[$this fileName] \
[$fileV versionName] \
[$fileV status] \
$owner \
$size \
[[$fileV project] name] \
[[$fileV config] name]:[$configV versionNumber] \
]
if {[$fileV status] == "working"} {
$this smallIcon rep_working_16
} else {
$this smallIcon rep_frozen_16
}
}
method UEnvBrObject::show {this} {
set fileClass [[[$this fileV] file] fileClass]
if {$fileClass == "externalText"} {
$wmttoolObj startM4Command viewer [$this path] "" [$this fileName]
} else {
# $fileClass == "externalBinary"
#
set dlg [YesNoWarningDialog new $wmttoolObj.uenvbinwarndlg \
-title "Binary File Warning" \
-message "'[$this fileName]' is a binary file. Continue?" \
-yesPressed "$wmttoolObj startM4Command viewer \
[list [$this path]] \
[list ""] \
[list [$this fileName]]"]
$dlg delCancelButton
$dlg delHelpButton
$dlg popUp
}
}
# Do not delete this line -- regeneration end marker