home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 1998 October
/
PCWorld_1998-10_cd.bin
/
software
/
prehled
/
komix
/
DATA.Z
/
csservices.tcl
< prev
next >
Wrap
Text File
|
1997-11-05
|
2KB
|
96 lines
#---------------------------------------------------------------------------
#
# (c) Cayenne Software Inc. 1996
#
# File: @(#)csservices.tcl /main/titanic/7
# Author: <generated>
# Description:
#---------------------------------------------------------------------------
# SccsId = @(#)csservices.tcl /main/titanic/7 5 Nov 1997 Copyright 1996 Cayenne Software Inc.
# Start user added include file section
require csservicen.tcl
# End user added include file section
require "csnode.tcl"
Class CSServicesNode : {CSNode} {
constructor
method destructor
method childName
method childObjects
method createChild
method reload
method doUpdate
}
constructor CSServicesNode {class this name} {
set this [CSNode::constructor $class $this $name]
# Start constructor user section
$this label "<object servers>"
$this icon rep_services_16
$this activeIcon rep_services_16
$this foldState 0
$this canReload 1
# End constructor user section
return $this
}
method CSServicesNode::destructor {this} {
# Start destructor user section
# End destructor user section
$this CSNode::destructor
}
method CSServicesNode::childName {this object} {
return [lindex $object 0]
}
method CSServicesNode::childObjects {this} {
set ns [ORB::nameServer]
return [$ns serverDefinitions]
}
method CSServicesNode::createChild {this object} {
return [CSServiceNode new $this.[$this childName $object] $object]
}
method CSServicesNode::reload {this} {
set ns [ORB::nameServer]
$ns reloadServerDefinitions
$this update 1
}
method CSServicesNode::doUpdate {this {rebuild 1}} {
$this CSNode::doUpdate $rebuild
set ns [ORB::nameServer]
set file [$ns serversFile]
set info [$this info]
$info addHeader "Server Definition File"
$info addItem "Location" $file
if ![BasicFS::exists $file] {
$info addLine " File cannot be accessed from this system."
} else {
if [catch {set owner [BasicFS::owner $file]} error] {
set owner "<unknown>"
} else {
set error ""
}
$info addItem "Owned by" $owner
if {$error != ""} {
foreach error [split $error \n] {
$info addLine " $error"
}
}
}
}
# Do not delete this line -- regeneration end marker