MaxGUI not compiling here

BlitzMax Forums/MaxGUI Module/MaxGUI not compiling here

Chroma(Posted 2009) [#1]
Not sure what the problem is but. Here's the test code. It's straight from a tutorial. I have Build GUI checked and when I tried to compile it throws a Can't find TGadget Identifier.

Honestly...any ideas?

Strict 

Local window:TGadget

window=CreateWindow("My Window",40,40,320,240)

While True
   WaitEvent 
   Print CurrentEvent.ToString()
   Select EventID()
   	Case EVENT_WINDOWCLOSE
   		End
   End Select
Wend



GaryV(Posted 2009) [#2]
Are you importing the GUI?


jsp(Posted 2009) [#3]
You need to import the maxgui drivers with the new maxgui version:
Import MaxGui.Drivers


Chroma(Posted 2009) [#4]
Ok, I didn't get the memo and it's not in the docs (which I rebuilt too). Thanks guys.

I'm building a little console app for my multi-threaded server. This should be interesting.


Ked(Posted 2009) [#5]
Ok, I didn't get the memo and it's not in the docs (which I rebuilt too).

Have you been gone for a while?


Chroma(Posted 2009) [#6]
Pretty much, been in and out of the forums for months. Was in Korea for a year and just got back to the states 3 months ago. Too darn busy to keep up with all the changes.


Ked(Posted 2009) [#7]
Just making sure. :)


Chroma(Posted 2009) [#8]
Just making sure of what?

Also, is there a way to make it so the program doesn't freeze when you click and drag the window title bar?


Brucey(Posted 2009) [#9]
Use an event hook.


Chroma(Posted 2009) [#10]
Ok. I typed EventHook in the IDE and nothing happenend.

Just kidding. Thanks I'll look into it.

Bah! You know the answer but are doing the Yoda thing. Can you just throw me some code (bone) here?


Chroma(Posted 2009) [#11]
Ok, I'm checking out EVENT_MOUSEDOWN and EVENT_MOUSELEAVE.

My kingdom for some examples in the docs...


Chroma(Posted 2009) [#12]
Ok so I guess I can't use MaxGUI for an app that has to keep running even if someone clicks on the window bar and holds the left mouse button down...

An Event Hook doesn't work because it's still an "Event"....Which runs while an event is taking place ie dragging the mouse. But if you click the window bar and hold it without dragging the mouse, then the app timing still freezes.


jsp(Posted 2009) [#13]
How is your app timing implemented?
If it's just a timer where you look for the timertick after waitevent, then yes the timing would freeze.
But if you look for the timertick in an event hook it would still work.


Chroma(Posted 2009) [#14]
Hmm...I'm using PollEvent() as opposed to WaitEvent(). It runs fine until I click and hold the window bar. I understand what you mean and I tried it but I guess my method isn't spot on. When I click the windown bar move the mouse it updates, if I click and hold and don't move the mouse then it still freezes.

Either way, thanks for trying to help. Help is a bit hard to come by these days around here.


Chroma(Posted 2009) [#15]
Nah it's not working dude. Thanks though. Having the whole app freeze while the window bar is clicked is just wacked.

I'm gonna take a break.


Chroma(Posted 2009) [#16]
Ok, my workaround is to just collect all the data from the MaxGUI app and then when the user clicks Start, just run an external .exe and pass all the arguments to it. Problem solved.