;) It *is* a little tricky.
What you need to know is that the RealizeWrapper is effectively
chained, because XmDialogShell uses XtInheritRealize, and
TransientShell->realize calls super_class->core_class.realize
(which is Vendor). (Note the WindUp loop in RealizeWrapper,
where we determine which class to use).
So it will be called multiple times, with different
widget classes at different points after the wind up.
Specifically, with DialogShell at one point and VendorShell
later.
So, while XmIsDialogShell(w) will always be true,
wc may or may not be == xmDialogShellWidgetClass. See what
I mean? It depends on the wind up. The check needs to be
done so that the Realize callback isn't called twice. Just
using !XmIsDialogShell(w) means that it will *never* be called.
Mitch
> -----Original Message-----
> From: Martin Simmons [mailto:[EMAIL PROTECTED]]
> Sent: Friday, July 14, 2000 3:44 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: lesstif-CVS bug: Broken pipe with Grace
>
>
> >>>>> On Fri, 14 Jul 2000 14:39:23 -0400, "Mitch Miers" <[EMAIL PROTECTED]>
>said:
>
> Mitch> My guess is that this is a DialogShell? I think the problem
> Mitch> is in BaseClass, in the RealizeWrapper. The check should
> Mitch> not be for XmIsDialogShell, but to see if the widget _class_
> Mitch> is XmDialogueShell, not if the widget *instance* is. Clearly
> Mitch> the latter will not change, but the former will in realize
> Mitch> wrapper chaining.
>
> Mitch> Try substituting "wc != xmDialogShellWidgetClass" for
> Mitch> !XmIsDialogShell(w)
>
> Mitch> in BaseClass.c
>
> You've lost me. In RealizeWrapper, wc is XtClass(w) and XmIsDialogShell
> *does* check the class (of the instance), so these seems to be equivalent
> (except that XmIsDialogShell also allows subclasses of XmDialogueShell, which
> is what we want here).
>
> __Martin
>