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

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Westmount Technology    1994
  4. #
  5. #      File:           @(#)checkbrvie.tcl    /main/hindenburg/1
  6. #      Author:         <generated>
  7. #      Description:
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)checkbrvie.tcl    /main/hindenburg/1   29 Aug 1996 Copyright 1994 Westmount Technology
  10.  
  11. # Start user added include file section
  12. require checkbrobj.tcl
  13. # End user added include file section
  14.  
  15.  
  16. Class CheckBrView : {BrowsView} {
  17.     constructor
  18.     method destructor
  19.     method sortit
  20.     method setMessages
  21.     attribute messageView
  22.     attribute checkDialog
  23. }
  24.  
  25. constructor CheckBrView {class this name} {
  26.     set this [BrowsView::constructor $class $this $name]
  27.     # Start constructor user section
  28.     $this columnCount 60
  29.     $this rowCount 10
  30.     $this selectionPolicy BROWSE
  31.     $this font "[m4_var get M4_font -context uce]"
  32.     BrowsHeader new $this.group -label Group -width 16
  33.     BrowsHeader new $this.checkValue -label "Check value" -width 12
  34.     BrowsHeader new $this.description -label Description -width 70
  35.     # End constructor user section
  36.     return $this
  37. }
  38.  
  39. method CheckBrView::destructor {this} {
  40.     # Start destructor user section
  41.     # End destructor user section
  42. }
  43.  
  44. method CheckBrView::sortit {this} {
  45.  
  46.     $this sort -column "$this.checkValue ascii decreasing"
  47. }
  48.  
  49. method CheckBrView::setMessages {this group} {
  50.  
  51.     foreach entry [[$this messageView] objectSet] {
  52.         $entry delete
  53.     }
  54.  
  55.     set messageList [[$this checkDialog] getGroup $group]
  56.  
  57.     set count 0
  58.     foreach entry $messageList {
  59.         BrowsObject new [$this messageView].$count
  60.         [$this messageView].$count label "[lindex $entry 0]"
  61.         [$this messageView].$count details \{"[lindex $entry 1]"\}
  62.         incr count
  63.     }    
  64. }
  65.  
  66. # Do not delete this line -- regeneration end marker
  67.  
  68.