PB_EventType_FreeGadget
PB_EventType_FreeGadget
when using the canvas gadget you often have to store the canvas properties on the gadget data, the event should be useful to free the data when just before the gadget gets destroyed instead of keeping track of all the created gagets.
Re: PB_EventType_FreeGadget
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: PB_EventType_FreeGadget
Thanks for the code. In windows and linux should be much easier to handle the destroy messages i could do it but no idea with mac.
Re: PB_EventType_FreeGadget
Runs on all OS. With MacOS, there is the problem that the internal GadgetList is updated only after calling WaitWindowEvent (). Therefore the difference to MacOS.
P.S. Found a bug in my module... Updated
P.S. Found a bug in my module... Updated
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: PB_EventType_FreeGadget
I think is better to add new function AddGadgetCallback(Gadget, #PB_FreeGadget, Callback) and AddWindowCallback(Window, #PB_CloseWindow, Callback)
This is invoke the functions before destroyed the Gadget or Window.
I event is to late.
This is invoke the functions before destroyed the Gadget or Window.
I event is to late.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: PB_EventType_FreeGadget
Yes. In windows i tried to bind to the WM_DESTROY message and it works the gadget still exists but in linux doesn't, in the destroy signal the gadget is already freed by PB so we need a native PB function.