home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1997 November
/
PCWorld_1997-11_cd.bin
/
software
/
programy
/
komix
/
DATA.Z
/
svdgrp.tcl
< prev
next >
Wrap
Text File
|
1996-12-11
|
3KB
|
96 lines
#---------------------------------------------------------------------------
#
# (c) Cadre Technologies Inc. 1995
#
# File: @(#)svdgrp.tcl /main/hindenburg/1
# Author: Harm Leijendeckers
# Description: Report on saved groups
# Usage in: SystemVersion
#
#---------------------------------------------------------------------------
# SccsId = @(#)svdgrp.tcl /main/hindenburg/1 11 Dec 1996 Copyright 1995 Cadre Technologies Inc.
Class ReportSavedGroups : {ReportBase} {
constructor
method systemReport
}
constructor ReportSavedGroups {class this} {
set this [ReportBase::constructor $class $this]
$this reportName "Saved Groups"
return $this
}
method ReportSavedGroups::systemReport {this} {
set allSavedGroups [[[$this systemV] system] savedGroups]
if [lempty $allSavedGroups] { return 0 }
set first 1
foreach sg [osort name $allSavedGroups] {
if !$first {
[$this report] line
[$this report] line
} else {
set first 0
}
[$this report] print "Saved Group: " 17 right
[$this report] print [$sg name] line
[$this report] print "Corporate Group: "
if { ![[$sg corporateGroup] isNil] } {
[$this report] print [[$sg corporateGroup] name]
} else {
[$this report] print -
}
[$this report] line
[$this report] line
[$this report] print Version 15 right
[$this report] separator " | "
[$this report] print Creator 15
[$this report] separator " | "
[$this report] print "Create Time" 14 center
[$this report] separator " | "
[$this report] print "Corporate" 9
[$this report] separator " | "
[$this report] print "Comments" 30
[$this report] separator " | "
[$this report] print "Contents" line
[$this report] print - 131 fill line
foreach version [osort versionNumber [$sg savedGroupVersions]] {
[$this report] print [$version versionNumber] 15 right
[$this report] separator " | "
[$this report] print [[$version creator] name] 15
[$this report] separator " | "
[$this report] print [fmtclock [$version createTime] "%R %D"] 14
[$this report] separator " | "
if { ![[$version corporateGroupVersion] isNil] } {
[$this report] print yes 9 center
} else {
[$this report] print no 9 center
}
[$this report] separator " | "
[$this report] print [$version comments] 30
[$this report] separator " | "
set contents ""
foreach fileV [osort file.type file.name [$version fileVersions]] {
set file [$fileV file]
set contents [format "%s%-33s" $contents \
"[$file name].[$file type].[$fileV versionName]"]
}
[$this report] print $contents 33 line
}
}
[$this report] page
return 0
}
set executeMe [ReportSavedGroups new]