home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
svdgrp.tcl
< prev
next >
Wrap
Text File
|
1997-06-19
|
3KB
|
97 lines
#---------------------------------------------------------------------------
#
# (c) Cadre Technologies Inc. 1995
#
# File: @(#)svdgrp.tcl /main/titanic/2
# Author: Harm Leijendeckers
# Description: Report on saved groups
# Usage in: SystemVersion
#
#---------------------------------------------------------------------------
# SccsId = @(#)svdgrp.tcl /main/titanic/2 19 Jun 1997 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] 15
[$this report] separator " | "
[$this report] print [clock format [$version createTime] \
-format "%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 versionNumber]"]
}
[$this report] print $contents 33 line
}
}
[$this report] page
return 0
}
set executeMe [ReportSavedGroups new]