home *** CD-ROM | disk | FTP | other *** search
/ PC World 1998 October / PCWorld_1998-10_cd.bin / software / prehled / komix / DATA.Z / mergeinfoo.tcl < prev    next >
Text File  |  1997-11-20  |  3KB  |  106 lines

  1. #---------------------------------------------------------------------------
  2. #
  3. #      (c)     Cayenne Software Inc.    1997
  4. #
  5. #      File:           @(#)mergeinfoo.tcl    /main/titanic/6
  6. #      Author:         <generated>
  7. #      Description:
  8. #---------------------------------------------------------------------------
  9. # SccsId = @(#)mergeinfoo.tcl    /main/titanic/6   20 Nov 1997 Copyright 1997 Cayenne Software Inc.
  10.  
  11. # Start user added include file section
  12. # End user added include file section
  13.  
  14.  
  15. Class MergeInfoObject : {BrowsObject} {
  16.     constructor
  17.     method destructor
  18.     method initialize
  19.     attribute conflict
  20.     attribute repObj
  21. }
  22.  
  23. constructor MergeInfoObject {class this name repObj} {
  24.     set this [BrowsObject::constructor $class $this $name]
  25.     $this repObj $repObj
  26.     # Start constructor user section
  27.     $this initialize
  28.     # End constructor user section
  29.     return $this
  30. }
  31.  
  32. method MergeInfoObject::destructor {this} {
  33.     # Start destructor user section
  34.     # End destructor user section
  35. }
  36.  
  37. method MergeInfoObject::initialize {this} {
  38.  
  39.     set rep [$this repObj]
  40.  
  41.     if [$rep hasConflict] {
  42.         $this conflict Yes
  43.     } else {
  44.         $this conflict No
  45.     }
  46.  
  47.     set fromRepObj [$rep fromRepObj]
  48.     set toRepObj [$rep toRepObj]
  49.  
  50.     set name [$fromRepObj getInfo Name]
  51.  
  52.     # Set icons and default foldState
  53.     set uiType "[$fromRepObj getInfo Type]"
  54.     set objType "[$fromRepObj uiClass]"
  55.     set typeSpec [getObjectSpec [.main objectHdlr] "$objType" "$uiType" 0]
  56.     if {"$typeSpec" != ""} {
  57.         set smallIcon [$typeSpec smallIcon]
  58.         set largeIcon [$typeSpec largeIcon]
  59.     } else {
  60.         set smallIcon ""
  61.         set largeIcon ""
  62.     }
  63.  
  64.     set details ""
  65.     lappend details $uiType
  66.     lappend details [$fromRepObj getInfo PropertyName]
  67.     lappend details [$this conflict]
  68.  
  69.     set baseRepObj [$rep baseRepObj]
  70.     if {[isCommand $baseRepObj] &&
  71.         ([$baseRepObj isA Version] ||
  72.          [$baseRepObj isA CorporateGroupVersion]) &&
  73.         ![catch {set versionName [$baseRepObj versionName]}]} {
  74.         lappend details $versionName
  75.     } else {
  76.         lappend details ""
  77.     }
  78.     set fromRepObj [$rep fromRepObj]
  79.     if {[isCommand $fromRepObj] &&
  80.         ([$fromRepObj isA Version] ||
  81.          [$fromRepObj isA CorporateGroupVersion]) &&
  82.         ![catch {set versionName [$fromRepObj versionName]}]} {
  83.         lappend details $versionName
  84.     } else {
  85.         lappend details ""
  86.     }
  87.     set toRepObj [$rep toRepObj]
  88.     if {[isCommand $toRepObj] &&
  89.         ([$toRepObj isA Version] ||
  90.          [$toRepObj isA CorporateGroupVersion]) &&
  91.         ![catch {set versionName [$toRepObj versionName]}]} {
  92.         lappend details $versionName
  93.     } else {
  94.         lappend details ""
  95.     }
  96.  
  97.     $this config \
  98.         -label $name \
  99.         -details $details \
  100.         -smallIcon $smallIcon \
  101.         -largeIcon $largeIcon \
  102. }
  103.  
  104. # Do not delete this line -- regeneration end marker
  105.  
  106.