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

Home » Developing U++ » UppHub » TabBar. Uninitialized member
Re: TabBar. Uninitialized member [message #20804 is a reply to message #19877] Thu, 09 April 2009 01:41 Go to previous messageGo to previous message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

One more little bug. Happens when all the tabs are closed and after that parent window is being closed. Parent window invokes Accept() for all the children, and TabBar::GetData() is called. Due to one can`t set TabBar::SetCursor(-1) before all it`s tabs are closed, TabBar tries to Get(0) and fails with ASSERT.
There are many ways to correct this. The simplest one is checking if there are any tabs in TabBar before trying to Get anything:

TabBar.h, line 268:
	virtual Value GetData() const			{ return HasCursor() ? Get(active) : Value(); }

change with:
	virtual Value GetData() const			{ return (GetCount() && HasCursor()) ? Get(active) : Value(); }


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Cairo
Next Topic: OfficeAutomation documented
Goto Forum:
  


Current Time: Fri Jun 12 02:19:09 GMT+2 2026

Total time taken to generate the page: 0.00564 seconds