home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.open-look
- Path: sparky!uunet!uuhelio!jpf
- From: jpf@uuhelio.uucp (Jeff Francis)
- Subject: Re: Caption Widget behaviour
- In-Reply-To: teugels@kiwi.uia.ac.be's message of Thu, 24 Dec 1992 12:00:46 GMT
- Message-ID: <JPF.92Dec31192237@uuhelio.uuhelio>
- Sender: jpf@uuhelio.uucp (Jeff Francis)
- Organization: HelioCentric Software
- References: <1992Dec24.120046.10626@reks.uia.ac.be>
- Date: Fri, 1 Jan 1993 01:22:37 GMT
- Lines: 65
-
-
- Even in OLIT 3.0 the Caption widget's insert/delete and change_managed
- methods seems to be a little brain damaged.
-
- For example, in Wcl the following works without warning (methinks you
- should get an error because of the two kids). But, when kid1 is
- unmanaged and kid2 is managed, kid2 appears at 0,0, not at the correct
- "captioned" position. Don't know why the multi-kid error doesn't
- occur.
-
- Ori.wcChildren: caption
-
- *caption.wcCreate: Caption
- *caption.wcChildren: kid1, kid2
- *caption.label: Caption
-
- *kid1.wcCreate: OblongButton
- *kid1.select: WcUnmanageCB(this), WcManageCB(*kid2)
-
- *kid2.wcCreate: OblongButton
- *kid2.wcManaged: False
- *kid2.select: WcUnmanageCB(this), WcManageCB(*kid1)
-
- In the following, when kid1 is selected it is unmanaged, destroyed,
- and then kid2 is created in it place. This results in the _error_,
- "OPEN LOOK Toolkit Error in application "Ori": The Caption widget
- takes only one child".
-
- Ori.wcChildren: caption
-
- *caption.wcCreate: Caption
- *caption.wcChildren: kid1
- *caption.label: Caption
-
- *kid1.wcCreate: OblongButton
- *kid1.select: WcUnmanageCB(this), WcDestroyCB(this)\
- WcCreateChildrenCB(*caption, kid2)
-
- *kid2.wcCreate: OblongButton
- *kid2.wcManaged: False
-
- And, as posted in the previous message, the following works fine!
-
- Ori.wcChildren: caption
-
- *caption.wcCreate: Caption
- *caption.wcChildren: kid1, kid2
- *caption.label: Caption
-
- *kid1.wcCreate: OblongButton
- *kid1.select: WcDestroyCB(this), WcManageCB(*kid2)
-
- *kid2.wcCreate: OblongButton
- *kid2.wcManaged: False
-
- IMHO the Caption widget should be able to have more than one kid and
- the first _managed_ kid is the one that the Caption widget captions.
- This would make the semantics of the Caption widget (and probably its
- implementation) simpler.
-
- One with the power of the source could reveal to us what is actually
- going on inside the Caption widget.
-
- --
- Jeff Francis, HelioCentric Software, uunet!uuhelio!jpf, (515) 232-1300
-