Open GoogleCodeExporter opened 9 years ago
This happens when you create a TextField with the default ctor (the one without
a
string). In the ctor of the TextField it creates an internal Text object with
the
same type of ctor. A Text object which takes no string variable doesn't call
mRows.push_back (...); (hence Text::mRows.size() == 0). When you call
TextField::setText(const string& text) it calls Text::setRow(0, text) (which
assumes
Text::mRows.size() != 0) when in fact it should be calling
mText::setContent(text)
(my assumption being that if Text::mRows.size() == 0 then the Text object has
no text
in it).
If my assumptions are correct then attached patch will fix this bug.
Original comment by aaron.r....@gmail.com
on 8 Dec 2009 at 9:12
Attachments:
Our svn repo is abandon for our Git repository, do you have the bug with the
latest
Git source as well?
Original comment by olof.nae...@gmail.com
on 9 Dec 2009 at 9:06
Yes the bug exists in the latest git.
If you take a look at the TextField empty ctor it calls the empty Text ctor. If
you
then look at TextField::setText you'll notice it calls Text::setRow which
throws an
exception if there are now rows in the Text object (which there clearly are
not).
Original comment by aaron.r....@gmail.com
on 9 Dec 2009 at 3:43
Then we should apply your patch.
Original comment by olof.nae...@gmail.com
on 9 Dec 2009 at 4:49
Original issue reported on code.google.com by
chriscam...@googlemail.com
on 2 Jan 2009 at 7:26