home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.x
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!organ!ware
- From: ware@organ.cis.ohio-state.edu (Peter Ware)
- Subject: Re: Can Primitive widgets be parents?
- In-Reply-To: whe@usc.edu's message of 26 Jul 1992 01: 00:49 -0700
- Message-ID: <WARE.92Jul27154037@organ.cis.ohio-state.edu>
- Originator: ware@organ.cis.ohio-state.edu
- Sender: news@cis.ohio-state.edu (NETnews )
- Organization: Ohio State Computer Science
- References: <l74mthINN5q4@phakt.usc.edu>
- Date: Mon, 27 Jul 1992 20:40:37 GMT
- Lines: 33
-
- > Can Primitive widgets be parents?
- Any widget can have as many popup children as desired -- it is
- primarily a conveniant method of getting properly qualified resource
- names.
-
- Also, as long as it is never managed a Primitive widget can have
- children created with XtCreateWidget(). For most applications this is
- not a useful thing although it is not unreasonable for a widget to
- create other widgets this way.
-
- > And in the same page, they create two buttons, but with same widget name
- > "button":
- >
- > Widget button;
- >
- > button = XtVaCreateManagedWidget("PushMe-1", xmPushButtonWidgetClass, parent,
- > NULL);
- > button = XtVaCreateManagedWidget("PushMe-2", xmPushButtonWidgetClass, parent
- > NULL);
-
- This is because the application does nothing further with the "button"
- widget. It would have been just as valid (ignoring error checking) to
- write:
-
- (void) XtVaCreateManagedWidget("PushMe-1", xmPushButtonWidgetClass,
- parent, NULL);
-
- and discard the return value.
- --
- Pete Ware / Ohio State University /
- ware@cis.ohio-state.edu
- (614) 538-0965
- Too bad the Nike slogan isn't "Just Do It Right" instead of "Just Do It"
-