home *** CD-ROM | disk | FTP | other *** search
/ PC World 1997 November / PCWorld_1997-11_cd.bin / software / programy / komix / DATA.Z / csclientno.tcl < prev    next >
Text File  |  1996-09-19  |  2KB  |  73 lines

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Cayenne Software Inc.    1996
  4. #
  5. #      File:           @(#)csclientno.tcl    /main/hindenburg/4
  6. #      Author:         <generated>
  7. #      Description:
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)csclientno.tcl    /main/hindenburg/4   19 Sep 1996 Copyright 1996 Cayenne Software Inc.
  10.  
  11. # Start user added include file section
  12. # End user added include file section
  13.  
  14. require "csprocessn.tcl"
  15.  
  16. Class CSClientNode : {CSProcessNode} {
  17.     constructor
  18.     method destructor
  19.     method context
  20.     method doUpdate
  21.     attribute client
  22. }
  23.  
  24. constructor CSClientNode {class this name i_client} {
  25.     set this [CSProcessNode::constructor $class $this $name]
  26.     $this client $i_client
  27.     # Start constructor user section
  28.  
  29.         $this process $i_client
  30.         $this label [$i_client owner]@[$i_client host]
  31.         $this hasChildren 0
  32.  
  33.        if {[$i_client host] == [ORB::currentHost] &&
  34.            [$i_client pid] == [ORB::currentProcessId]} {
  35.         $this icon rep_clself_16
  36.         } else {
  37.         $this icon rep_client_16
  38.         }
  39.  
  40.         # Allow clients to be dropped in the lock list of the
  41.         # Lock Management window, to initialize the "Set Lock..."
  42.         # dialog with this client's host, pid and user.
  43.         #
  44.         $this conversionSet "CSCLIENTNODE context"
  45.  
  46.     # End constructor user section
  47.     return $this
  48. }
  49.  
  50. method CSClientNode::destructor {this} {
  51.     # Start destructor user section
  52.     # End destructor user section
  53.     $this CSProcessNode::destructor
  54. }
  55.  
  56. method CSClientNode::context {this} {
  57.     set client [$this client]
  58.     return [list [$client host] [$client pid] [$client owner]]
  59. }
  60.  
  61. method CSClientNode::doUpdate {this {rebuild 1}} {
  62.     $this CSProcessNode::doUpdate $rebuild
  63.  
  64.     set info [$this info]
  65.     set client [$this client]
  66.  
  67.     $info addHeader "Client"
  68.     $info addItem "Of Server" [[$client server] name]
  69. }
  70.  
  71. # Do not delete this line -- regeneration end marker
  72.  
  73.