Controlling window callback causing crazy crashes? Crap!!!

Just starting out? Need help? Post your questions and find answers here.
halo
Enthusiast
Enthusiast
Posts: 104
Joined: Mon Jan 26, 2004 2:49 am

Controlling window callback causing crazy crashes? Crap!!!

Post by halo »

This crashes on the MessageRequester() command.

Code: Select all

Procedure cb(WindowID, Message, wParam, lParam)
  Result = #PB_ProcessPureBasicEvents
  ;
  ; you code here
  ;
  ProcedureReturn Result
EndProcedure

OpenWindow(0,200,200,400,300,0,"")
SetWindowCallback(@cb)
MessageRequester("","Hello.")
MrMat
Enthusiast
Enthusiast
Posts: 762
Joined: Sun Sep 05, 2004 6:27 am
Location: England

Post by MrMat »

Try this:

Code: Select all

SetWindowCallback(@cb()) 
Mat
halo
Enthusiast
Enthusiast
Posts: 104
Joined: Mon Jan 26, 2004 2:49 am

Post by halo »

I am stoopid.
MrMat
Enthusiast
Enthusiast
Posts: 762
Joined: Sun Sep 05, 2004 6:27 am
Location: England

Post by MrMat »

Nah, just one of those days probably!
Mat
Brice Manuel

Post by Brice Manuel »

I am stoopid.
Nah, we all make mistakes like this, especially if you are tired.
Post Reply