Bizarre problem with callbacks



In my current project (a dart game) I have a struct called dartsType and I
have a variable of said type declared in main (the variable is named
"darts").  I have several callbacks (2 connected to a drawing area, 1
connected to a button) in which the userdata parameter is "&darts".  The
problem is this:  &darts should be the same value in all four places (3
callbacks and main).  In fact, though, it is the same in main and the two
drawing area callbacks, but different in the button callback.  I have been
looking at it for days now, and can't figure out why this is.  I've
stripped code left and right, and have included a Makefile, to make
examining the code as easy as possible.  

I'd appreciate *anyone* taking a look to see if they can find what I'm
doing wrong.  The relevant code is attached as a tarball that untars to a
directory "test".

Thanks.

Dan 
 ____    Kressin   ____   .-----------------------------------. 
/___ \____________/ __ \  | dkressin@acm.org                  |
    \  \    /      /  \ | | Lead Programmer/Analyst           |
 ___/ __\/\/rench_ \__/ | | University of Wisconsin - Oshkosh |
\____/            \____/  | www.mio.uwosh.edu/~kressd11/      |
                          `-----------------------------------'

stripped test code



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]