On Tue, Dec 18, 2007 at 08:28:45AM +0000, Jeremy Henty wrote:
On Tue, Dec 18, 2007 at 07:11:27AM +0000, Jeremy Henty wrote:
On Mon, Dec 17, 2007 at 04:44:01PM +0100, Johannes Hofmann wrote:
Just tried to use the TextEditor widget from fltk ... Unfortunately it crashes on division by zero here...
Same here
The problem is that "editor->draw ()" gets called before "editor->layout ()", so the maxsize_ member is 0. I can fix the crash by explicitly calling "editor->layout ()" after creating the TextEditor and attaching its TextBuffer , but then the editor comes up inactive; it displays nothing and responds to nothing, although it will still submit its initial text when the form is activated.
I think there must be something about the way DW creates widgets that means the TextEditor isn't being managed properly; it can't be right that layout() is not being called.
Thoughts?
Please try this patch: diff -r 3d6ba14ceb96 dw/fltkviewport.cc --- a/dw/fltkviewport.cc Tue Dec 18 16:42:42 2007 +0100 +++ b/dw/fltkviewport.cc Tue Dec 18 16:47:31 2007 +0100 @@ -154,6 +154,7 @@ void FltkViewport::layout () { theLayout->viewportSizeChanged (this, w(), h()); adjustScrollbarsAndGadgetsAllocation (); + Group::layout (); } void FltkViewport::draw_area (void *data, const Rectangle& cr )
Jeremy Henty
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev