Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Part8 - Part9 - Single Page

Top Document: Motif FAQ (Part 9 of 9)
Previous Document: 317) Why doesn't XtNameToWidget (widget, "MyName") work?
Next Document: 319) How can an application manage events on multiple displays?


[ Usenet FAQs | Search | Web FAQs | Documents | RFC Index ]

318) Why does my callback's client data structure contain incorrect


values when the callback is called?  I created a structure and used a pointer
to it as callback client data.
[Last modified: Apr 95]

Answer: If your structure is declared as automatic, the callback will probably
not be executed within the structure's scope, so the pointer to the structure
will become invalid.  You can avoid this problem by declaring your structure
external or by allocating with malloc or (in C++) new.

Ken Lee



Top Document: Motif FAQ (Part 9 of 9)
Previous Document: 317) Why doesn't XtNameToWidget (widget, "MyName") work?
Next Document: 319) How can an application manage events on multiple displays?

Part1 - Part2 - Part3 - Part4 - Part5 - Part6 - Part7 - Part8 - Part9 - Single Page


[ Usenet FAQs | Search | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
kenton@rahul.net (Ken Lee)

Last Update May 13 2007 @ 00:23 AM