U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » LineEdit, EditFields, DocEdit » DocEdit call RemoveLines make Assertion failed.
Re: DocEdit call RemoveLines make Assertion failed. [message #14477 is a reply to message #14470] Wed, 27 February 2008 09:41 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
HenryXin wrote on Tue, 26 February 2008 21:55

Thank for your reply.
But I try it only using line.Remove(0, remove_num);
But Fatal Error:
Assertion failed in C:\upp\uppsrc/Core/Vcont.h, line 17
i >=0 && i < item.

I read the code:
DocEdit inherit from TextCtrl has the memeber:
Vector<Ln> line;
and it defines its member:
Vector<Para> para;
So only call line.Remove(), when call the parm.Remove()?
And the void DocEdit::RemoveLines(int line, int count) is strange?
void DocEdit::RemoveLines(int line, int count)
{
para.Remove(line, count);
ASSERT(this->line.GetCount() == para.GetCount());
}
It removes para, but check the line == para?

Best Regards
Henry



I am sorry, I was under impression that we are talking about LineEdit... Well, DocEdit really does overload RemoveLines. 'para' works as cache of paragraph metrics (height for given width).

Means that if you override RemoveLines for DocEdit, you should call DocEdit::RemoveLines there... (must add that info to docs).

Other than that, I suggest posting a more complete code.

Mirek
 
Read Message icon9.gif
Read Message icon7.gif
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon14.gif
Previous Topic: Best way to implement a two-way LineEdit
Next Topic: Enter time as duration
Goto Forum:
  


Current Time: Mon Oct 12 06:24:51 GMT+2 2026

Total time taken to generate the page: 0.00714 seconds