Added a note about removing a widget from its parent group or window before

calling Fl::delete_widget() (STR #2226).


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@6835 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Albrecht Schlosser 2009-07-25 09:56:24 +00:00
parent 50253e3ef6
commit 98f814878e

View File

@ -546,11 +546,14 @@ window and then calls the default widget callback.</p>
<H4><A NAME="Fl.delete_widget">void delete_widget(Fl_Widget*);</A></H4>
<p>Schedules a widget for deletion at the next call to the event loop.
Use this method to delete a widget inside a callback function.
To avoid early deletion of widgets, this function
Use this method to delete a widget inside a callback function. As with
normal widget deletion it is your responsibility to remove() the widget
from any parent group or window before calling this.</p>
<p>To avoid early deletion of widgets, this function
should be called toward the end of a callback and only after any call
to the event loop (<tt>Fl:wait()</tt>, <tt>Fl::flush()</tt>,
<tt>fl_ask()</tt>, etc).</p>
to the event loop (<tt>Fl::wait()</tt>, <tt>Fl::flush()</tt>,
<tt>Fl::check()</tt>, <tt>fl_ask()</tt>, etc.).</p>
<p>When deleting groups or windows, you must only delete the group or
window widget and not the individual child widgets.</p>