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? Jeremy Henty