home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / windows / openloo / 4945 < prev    next >
Encoding:
Text File  |  1992-12-31  |  2.4 KB  |  78 lines

  1. Newsgroups: comp.windows.open-look
  2. Path: sparky!uunet!uuhelio!jpf
  3. From: jpf@uuhelio.uucp (Jeff Francis)
  4. Subject: Re: Caption Widget behaviour
  5. In-Reply-To: teugels@kiwi.uia.ac.be's message of Thu, 24 Dec 1992 12:00:46 GMT
  6. Message-ID: <JPF.92Dec31192237@uuhelio.uuhelio>
  7. Sender: jpf@uuhelio.uucp (Jeff Francis)
  8. Organization: HelioCentric Software
  9. References: <1992Dec24.120046.10626@reks.uia.ac.be>
  10. Date: Fri, 1 Jan 1993 01:22:37 GMT
  11. Lines: 65
  12.  
  13.  
  14. Even in OLIT 3.0 the Caption widget's insert/delete and change_managed
  15. methods seems to be a little brain damaged.
  16.  
  17. For example, in Wcl the following works without warning (methinks you
  18. should get an error because of the two kids).  But, when kid1 is
  19. unmanaged and kid2 is managed, kid2 appears at 0,0, not at the correct
  20. "captioned" position.  Don't know why the multi-kid error doesn't
  21. occur.
  22.  
  23. Ori.wcChildren:                caption
  24.  
  25. *caption.wcCreate:            Caption
  26. *caption.wcChildren:            kid1, kid2
  27. *caption.label:                Caption
  28.  
  29. *kid1.wcCreate:                OblongButton
  30. *kid1.select:                WcUnmanageCB(this), WcManageCB(*kid2)
  31.  
  32. *kid2.wcCreate:                OblongButton
  33. *kid2.wcManaged:            False
  34. *kid2.select:                WcUnmanageCB(this), WcManageCB(*kid1)
  35.  
  36. In the following, when kid1 is selected it is unmanaged, destroyed,
  37. and then kid2 is created in it place.  This results in the _error_,
  38. "OPEN LOOK Toolkit Error in application "Ori": The Caption widget
  39. takes only one child".  
  40.  
  41. Ori.wcChildren:                caption
  42.  
  43. *caption.wcCreate:            Caption
  44. *caption.wcChildren:            kid1
  45. *caption.label:                Caption
  46.  
  47. *kid1.wcCreate:                OblongButton
  48. *kid1.select:                WcUnmanageCB(this), WcDestroyCB(this)\
  49.                     WcCreateChildrenCB(*caption, kid2)
  50.  
  51. *kid2.wcCreate:                OblongButton
  52. *kid2.wcManaged:            False
  53.  
  54. And, as posted in the previous message, the following works fine!
  55.  
  56. Ori.wcChildren:                caption
  57.  
  58. *caption.wcCreate:            Caption
  59. *caption.wcChildren:            kid1, kid2
  60. *caption.label:                Caption
  61.  
  62. *kid1.wcCreate:                OblongButton
  63. *kid1.select:                WcDestroyCB(this), WcManageCB(*kid2)
  64.  
  65. *kid2.wcCreate:                OblongButton
  66. *kid2.wcManaged:            False
  67.  
  68. IMHO the Caption widget should be able to have more than one kid and
  69. the first _managed_ kid is the one that the Caption widget captions.
  70. This would make the semantics of the Caption widget (and probably its
  71. implementation) simpler.
  72.  
  73. One with the power of the source could reveal to us what is actually
  74. going on inside the Caption widget.
  75.  
  76. -- 
  77. Jeff Francis, HelioCentric Software, uunet!uuhelio!jpf, (515) 232-1300
  78.