home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
files.tcl
< prev
next >
Wrap
Text File
|
1997-08-26
|
3KB
|
103 lines
#---------------------------------------------------------------------------
#
# (c) Cadre Technologies Inc. 1995
#
# File: @(#)files.tcl /main/titanic/2
# Author: Harm Leijendeckers
# Description: Report on file versions
# Usage in: SystemVersion and higher
#
#---------------------------------------------------------------------------
# SccsId = @(#)files.tcl /main/titanic/2 26 Aug 1997 Copyright 1995 Cadre Technologies Inc.
Class ReportFiles : {ReportBase} {
constructor
attribute printProps
method systemReport
method doNameAndType
}
constructor ReportFiles {class this} {
set this [ReportBase::constructor $class $this]
if { [lsearch $Options "properties"] != -1 } {
$this printProps 1
} else {
$this printProps 0
}
$this reportName Files
return $this
}
method ReportFiles::systemReport {this} {
set allFileVersions [query "file.type != cdm" \
[[$this systemV] localFileVersions]]
set allExternalLinks [[$this systemV] externalLinks]
if { ![llength $allFileVersions] && ![llength $allExternalLinks] } {
return 0
}
set report [$this report]
$report header {
[$this report] print File 31
[$this report] print Type 11
[$this report] print Version 26
[$this report] print Status 11
[$this report] print Corporate 10
[$this report] print Link line
[$this report] line
}
foreach fileV [osort file.name file.type $allFileVersions] {
$this doNameAndType [[$fileV file] name] [[$fileV file] type]
$report print [$fileV versionName] 25
$report space
$report print [$fileV status] 10
$report space
$report print \
[expr { [$fileV inCorporate] ? "yes" : "no" } ] 10 center
set link [[$this systemV] findFileVersionLink -byFileVersion $fileV]
if ![$link isNil] {
$report print [$link status] 30
}
$report line
if [$this printProps] {
$this showProperties $fileV
}
}
if [llength $allExternalLinks] {
if [llength $allFileVersions] { $report line }
foreach externalLink [osort type name $allExternalLinks] {
$this doNameAndType [$externalLink name] [$externalLink type]
$report print [$externalLink path] line
if [$this printProps] {
$this showProperties $externalLink
}
}
}
$report page
$report remove header
return 0
}
method ReportFiles::doNameAndType {this name type} {
set report [$this report]
$report print $name 30
$report space
$report print $type 10
$report space
}
set executeMe [ReportFiles new]