Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » TabCtrl » Question and problems around TabCtrl
Re: Question and problems around TabCtrl [message #27564 is a reply to message #27559] Fri, 23 July 2010 11:54 Go to previous message
mubeta is currently offline  mubeta
Messages: 77
Registered: October 2006
Member
I found the cause, but I need a long time for follow all the codes:

So:
After add an tab, I also set a callback to WhenSet:

tab.WhenSet << THISBACK(foo);

foo get information from tab, so, when tab.Reset() is destroing the last one, (tab.Reset() method call again WhenSet() before to return), I get the crash.

WhenSet() is called again, at the second time adding loop, in this case it's really dangerous, because all the need vars are not ready.

So, in fact:
First step: adding tabs all is ok, because WhenSet is empty.
Second step: assign a callback to WhenSet.
Third step: resetting the tab result in a crash because Reset() also call WhenSet(), and in MY CASE is not good.
Third step: adding new tabs result in a crash becase WhenSet is assigned but my vars are not ready.

So, now the problem is: how to remove the WhenSet callback??
tab.WhenSet << 0; (compiler error)
tab.WhneSet = 0; (compiler error)
tab.WhenSet << CNULL; (compiler error)
tab.WhenSet << Callback::Empty(); (ok for compiler, but nothing change in the application. the callback in fact is not cleared).

uff.

I only need to be able to remove the WhenSet callback some times.
 
Read Message
Read Message
Read Message
Previous Topic: How to change tabctrl background color ?
Next Topic: how to tell which tab is which
Goto Forum:
  


Current Time: Tue Jun 03 00:22:25 CEST 2025

Total time taken to generate the page: 0.02826 seconds