I create widget “NAME A” which call callback function.
If I want to destroy widget “NAME A” in this callback function
then Photon destroy my program and I see SIGSEGV addresses. >
Usally, it is no problem to destroy a Widget inside the callback function.
The widget is in this time only marked as destroy. When you
comeback in the Photon Mainloop the widget will be really destroyed.
You can call PtSyncPhoton(), if need the destroying at this point.
After the call all Pt_CB_DESTROYED callbacks will be called.
You run in an another problem. If the widget created inside
PhAB, you should normally do not delete it. The phab library
think that this still exist, but it does not at this point.
Try to use PtUnrealizeWidget and PtRealizeWidget or
you can set a flag that the widget will not be realized at normal
point, when it’s parent realized.
PtSetArg( &arg, Pt_ARG_FLAGS, Pt_TRUE, Pt_DELAY_REALIZE );
PtSetResources( widget, 1, &arg );
BitCtrl Systems GmbH
Weißenfelser Straße 67
Germany - 04229 Leipzig
Phon. +49 341 490 670
FAX. +49 341 490 67 15