Added the 2.0 Fl_Widget::copy_label() method to allow FLTK 1.x

applications to have their label strings managed by FLTK (STR
#630)

Added Fl::delete_widget() method to safely delete widgets in
callback methods (STR #629)


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3917 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet
2004-11-23 19:47:52 +00:00
parent 5cc0f07c8a
commit a42ded75e2
10 changed files with 127 additions and 19 deletions
+10 -1
View File
@@ -532,7 +532,16 @@ button->when(FL_WHEN_CHANGED | FL_WHEN_NOT_CHANGED);
<CENTER><TABLE WIDTH="80%" BORDER="1" CELLPADDING="5" CELLSPACING="0" BGCOLOR="#cccccc">
<TR>
<TD><B>Hint:</B>
<TD><B>Note:</B>
<P>You cannot delete a widget inside a callback, as the
widget may still be accessed by FLTK after your callback
is completed. Instead, use the <a
href='Fl.html#Fl.delete_widget'><tt>Fl::delete_widget()</tt></a>
method to mark your widget for deletion when it is safe
to do so.</p>
<p><B>Hint:</B>
<P>Many programmers new to FLTK or C++ try to use a
non-static class method instead of a static class method