WaitEvent() Not working?

BlitzMax Forums/BlitzMax Beginners Area/WaitEvent() Not working?

BLaBZ(Posted 2009) [#1]
This has certainly been frustrating, can't seem to figure out why I keep getting the message "Compile Error, Identifier 'WaitEvent' Not Found"

Framework MaxGUI.Drivers

MyFirstWindow:TGadget=CreateWindow("My App", 200,200,700,500,Null,WINDOW_TITLEBAR | WINDOW_MENU)


While Not KeyHit(ESCAPE_KEY)
WaitEvent()
Wend

End



BLaBZ(Posted 2009) [#2]
None of my event commands appear to be working :(


SebHoll(Posted 2009) [#3]
If you are using the Framework keyword, this instructs BlitzMax to only link with the modules explicitly named (e.g. in this case MaxGUI.Drivers). The WaitEvent() command is part of the BRL.EventQueue and as this isn't required by MaxGUI.Drivers, the module and its commandset will not be included.

To fix this you can either:

1) Replace your Framework keyword with just Import instead. This causes BlitzMax to link in all BRL.* and PUB.* modules automatically, and then import MaxGUI.Drivers on-top.

Import MaxGUI.Drivers
2) Add an explicit import for Brl.EventQueue underneath...

Framework MaxGUI.Drivers
Import BRL.EventQueue
This will import only these two modules (and their dependencies), reducing your executable size.

If you would like to use the Framework keyword, I suggest you take a look at Framework Assistant.