small medium large xlarge

Borg_small_pragsmall
16 Jul 2009, 00:04
Martin Taylor (1 post)

Hi,

I am working through the examples and I am trying to debug why my delegate is not getting called. This is the simple delegates setup for windowShouldClose and )windowShouldZoom. I have breakpoints and printfs inside the delegate methods but they are not getting called. How do I use the debugger to detemrine why they are not getting called?

Thanks Martin

Daniel_pragsmall
24 Jul 2009, 13:32
Daniel H Steinberg (98 posts)

The biggest cause is that the signature of the method you implement must match exactly the specified delegate signature. Otherwise this is tough to debug. The reason is that delegate methods are only called if they are implemented. If you spell them differently or have a different return type then the delegate method will not be called AND you won’t get a warning because there is nothing wrong from the compiler’s point of view. You have created an entirely different method that no one calls.

You must be logged in to comment