|
|
+1
> On Oct 26, 2022, at 6:29 AM, 'melcher....@googlemail.com' via fltk.coredev <fltkcoredev@googlegroups.com> wrote:
>
> Problem:
>
> When adding user_data in callbacks, it is difficult to make sure that the user_data is deleted when the widget is deleted, especially when deleting a group auto deletes all children.
>
> Solution:
>
> Add FL_WHEN_DELETING to Fl_Widget::when(), so before deleting a widget, the user can receive a callback and get a chance to clean up. The reason for the callback would be indicated by setting Fl::event() to FL_DELETING, which would also be sent to Fl_Widget::handle(int).
>
> --
> You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/1d37d011-1554-4295-9fac-34b7379ba85bn%40googlegroups.com.
________________________
Michael Sweet
--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/1C9AAAA1-3F55-475C-BD77-335B61D02106%40gmail.com.
[ Direct Link to Message ] | |
|
| |