[comp.windows.x] XView error message

swf@tdatirv.UUCP (swf) (05/26/90)

I have run into a strange run-time error message several times while developing
XView applications.  Under arcane circumstances I get the following:
XView Warning: obj 0x### invalid object(embedding seal incorrect) ...
or something like that.  I have not found any clear pattern to when I get it,
I have usually been able to eliminate it by moving some code from one place
to another.  Generally the code tries to change display attributes of an
XView object.  Unfortunately, I am doing this mostly by guesswork, since I
do not really know what conditions cause an embedding seal violation.

So, what does this mean, and what makes it occur?
[I have looked in TFM and could not find any error messages documented]

This error is occuring most persistantly in code in which I am trying to
dynamically change the active choices in a menu according to the cursor
position when the SELECT button was pressed.  I have tried all sorts of
organizations for the code, and the only one which did not die displaying
the menu was when I disabled the code to change the selectability of the
menu items.  Unfortunately, the program then dies if the user selects an
invalid menu item!

So how do I do this?
About the only thing I have not tried is using a MENU_GEN_PROC, since I
consider it inadequately documented in all existing XView documentation.
And if this *is* how to do it, how do I use a MENU_GEN_PROC to change the
attributes of a pop-up menu (as opposed to a pull-right or pull-down menu)?
----------------
uunet!tdatirv!swf				(Stanley Friesen)
						(Teradata Corporation)

swf@tdatirv.UUCP (swf) (05/30/90)

I have run into a strange run-time error message several times while developing
XView applications.  Under arcane circumstances I get the following:
XView Warning: obj 0x### invalid object(embedding seal incorrect) ...
or something like that.  I have not found any clear pattern to when I get it,
I have usually been able to eliminate it by moving some code from one place
to another.  Generally the code tries to change display attributes of an
XView object.  Unfortunately, I am doing this mostly by guesswork, since I
do not really know what conditions cause an embedding seal violation.

So, what does this mean, and what makes it occur?
[I have looked in TFM and could not find any error messages documented]

This error is occuring most persistantly in code in which I am trying to
dynamically change the active choices in a menu according to the cursor
position when the SELECT button was pressed.  I have tried all sorts of
organizations for the code, and the only one which did not die displaying
the menu was when I disabled the code to change the selectability of the
menu items.  Unfortunately, the program then dies if the user selects an
invalid menu item!

So how do I do this?
----------------
uunet!tdatirv!swf				(Stanley Friesen)
						(Teradata Corporation)

argv@turnpike.Eng.Sun.COM (Dan Heller) (05/31/90)

In article <109@tdatirv.UUCP> swf@tdatirv.UUCP () writes:
> I have run into a strange run-time error message several times while developing
> XView applications.  Under arcane circumstances I get the following:
> XView Warning: obj 0x### invalid object(embedding seal incorrect) ...

This sounds suspiciously like you're doing things with menus.

> So, what does this mean, and what makes it occur?
> [I have looked in TFM and could not find any error messages documented]
The new FM has a chapter on error handling, messages, etc...  It should
be available in July.

> This error is occuring most persistantly in code in which I am trying to
> dynamically change the active choices in a menu according to the cursor
> position when the SELECT button was pressed.  I have tried all sorts of
Aha!  I knew it :-)

Unfortunately, you weren't specific about what you're trying to do.
However, suffice to say that you should never play with menus or
menu items while they are being displayed.  The new edition of the
XView Programmer's manual (the new FM discussed above) goes into
more detail about this.
--
dan
----------------------------------------------------
O'Reilly && Associates   argv@sun.com / argv@ora.com
Opinions expressed reflect those of the author only.