Null object when using createwindow

BlitzMax Forums/BlitzMax Programming/Null object when using createwindow

*(Posted 2005) [#1]
When im using create window, I want to have a windowed mode with my game that either uses glmax2d in fullscreen or maxgui with a canvas in windowed mode but when it reaches the create window command it pipes up with an error telling me im trying to access a null object.

All im doing is:
Framework brl.glmax2d
Import brl.maxgui

Global GameWin = CreateWindow( "TileCascade - Copyright ŠEdzUp", 0, 0, 640, 480, 0, 15 )
Global GameCanvas = CreateCanvas( 0, 0, 640, 480, GameWin )

Repeat;Until MouseDown(1)=True
End


is there something im missing as its driving me nutts.


Perturbatio(Posted 2005) [#2]
Framework BRL.Win32MaxGUI
Import brl.glmax2d

Global GameWin:TGadget = CreateWindow( "TileCascade - Copyright EdzUp", 0, 0, 640, 480)
Global GameCanvas:TGadget = CreateCanvas( 0, 0, 640, 480, GameWin )

Repeat

Until MouseDown(1)=True
End



*(Posted 2005) [#3]
thanks will have a look :D


*(Posted 2005) [#4]
finally I just added:
Import brl.Win32maxGUI
import brl.glmax2d


I added this to the import of the source and it works perfectly :)


Perturbatio(Posted 2005) [#5]
yep, you might want to check out the Framework Assistant


*(Posted 2005) [#6]
yeah got the framework assistant, but it wouldnt work on TileCascade something about cyclic errors although the game compiles perfectly in Max.