What does bbSetBlitz3DEventCallback do?

Archives Forums/Blitz3D SDK Programming/What does bbSetBlitz3DEventCallback do?

ChristianK(Posted 2007) [#1]
I looked at the products page and was wondering about the following functions:

bbSetBlitz3DEventCallback
bbSetBlitz3DDebugCallback
bbSetBlitz3DDebugMode

Any ideas what they are used for?


BlitzSupport(Posted 2007) [#2]
...DebugCallback sends the Blitz debugger's error message to a function of your choice, so you can display it how you want and shut things down however you see fit. Eg. (untested)...

Function Nuke (error$) ; Debug error goes into error$
    Print error$
    End
End Function


...DebugMode turns the Blitz3D debugger on and off, just like selecting the Debug menu option in Blitz3D's IDE.

...EventCallback lets you handle input events yourself. Too advanced for me.


ChristianK(Posted 2007) [#3]
Thank you!


Mesh(Posted 2007) [#4]
Wow, thx!
______________________________
All simply =)


AKJ(Posted 2007) [#5]
In PureBasic a debug callback routine could look like this:
Procedure MyDebugHandler(msg$)
  MessageRequester("My World Has Collapsed!", "Error: "+msg$)
  bbEndBlitz3D()
  End
EndProcedure

And it is invoked like this:
bbSetBlitz3DDebugCallback(@MyDebugHandler())

The Blitz3D SDK documentation implies that the call to bbEndBlitz3D() can be omitted from the callback routine, but in practice it seems to be needed. The actual wording is:
The Blitz3D runtime is closed before the error handler is invoked by the Blitz3DSDK