On Mar 25, 2007, at 9:16 PM, Milan wrote:

> void MainWindow::someFunc(void *b) { // "b" is "browser"
>       Window *group = ((Browser *)storage)->window();
>       usinged long tmp = ((MainWindow *) group)->intVar;
>       // ...
> }
>
> then value of "intVar" is always "561" no matter what actual value  
> is in
> it!!?

Assuming that 'b' is correct to begin with, and the other type nemas  
are right, this code seems OK. You seem to have a bug here somewhere.  
It always helps be to print out the actual value of the pointeers  
using either the debugger or printf("0x%08x... and verify the  
pointers. It all could get a little bit rough if you use multiple  
inheritance. In that case, you should enable RTTI and use  
dynamic_cast<type>(variable) and friends to get better results.
----
http://robowerk.com/


_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to