wont run

BlitzMax Forums/MaxGUI Module/wont run

freedo(Posted 2011) [#1]
downloaded max gui but cant examples to run..I have been copy/pasteing them from the blixmax tutorial...

compiler error: Identifier 'TGadget' not found


H&K(Posted 2011) [#2]
The second to top post in the BlitzMax GUI Programming section (Well the top post is you exclude the skicky explains this.

You add Import MaxGui.Drivers

I agree the exaples should run, but you could have looked before bug reporting


freedo(Posted 2011) [#3]
ok did that...


now it says...unhandeld eception error...


freedo(Posted 2011) [#4]
heres the example..



' createwindow.bmx
Import MaxGui.Drivers
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


H&K(Posted 2011) [#5]
Runs fine for me

You downloaded the current everything?

Plus when you get an error it normaly is on one line, and strange as it may seem, WHICH LINE/command gives the error tells us a lot more than you think


freedo(Posted 2011) [#6]
it outputs this code and stops at the line...

"Global StandardIOStream:TStream=TTextStream.Create( New TCStandardIO,TTextStream.UTF8 )"



Strict

Rem
bbdoc: System/StandardIO
End Rem
Module BRL.StandardIO

ModuleInfo "Version: 1.05"
ModuleInfo "Author: Mark Sibly"
ModuleInfo "License: Blitz Shared Source Code"
ModuleInfo "Copyright: Blitz Research Ltd"
ModuleInfo "Modserver: BRL"

ModuleInfo "History: 1.05 Release"
ModuleInfo "History: 1.04 Release"
ModuleInfo "History: CStandardIO now goes through a UTF8 textstream"

Import BRL.TextStream

Type TCStandardIO Extends TStream

Method Flush()
fflush_ stdout_
End Method

Method Read( buf:Byte Ptr,count )
Return fread_( buf,1,count,stdin_ )
End Method

Method Write( buf:Byte Ptr,count )
Return fwrite_( buf,1,count,stdout_ )
End Method

End Type

Rem
bbdoc: BlitzMax Stream object used for Print and Input
about: The #Print and #Input commands can be redirected by setting the @StandardIOStream Global to an alternative Stream Object.
End Rem
Global StandardIOStream:TStream=TTextStream.Create( New TCStandardIO,TTextStream.UTF8 )

Rem
bbdoc: Write a string to the standard IO stream
about: A newline character is also written after @str.
End Rem
Function Print( str$="" )
StandardIOStream.WriteLine str
StandardIOStream.Flush
End Function

Rem
bbdoc: Receive a line of text from the standard IO stream
about: The optional @prompt is displayed before input is returned.
End Rem
Function Input$( prompt$=">" )
StandardIOStream.WriteString prompt
StandardIOStream.Flush
Return StandardIOStream.ReadLine()
End Function


H&K(Posted 2011) [#7]
Im out of ideas. I will post what I can "see" but I dont think it will be helpfull

The unhandeld eception error is (I think) part of the print command, which is sending the print the output window (NOT the maxGUI window)
If I just run
While True
WaitEvent 
Print CurrentEvent.ToString()
Select EventID()
Case EVENT_WINDOWCLOSE
End
End Select
Wend 
Which as you see has no MaxGUI it still works on mine. Does it still work on yours? If so its not a GUI problem


freedo(Posted 2011) [#8]
yeah..this code works on mine....

I have not installed any mods before now....

seemed straight forward...download/unzip and copy to module folder..

some guys on the forum talk of rebuiling/compiling mods..

could that be something i need to do..?


H&K(Posted 2011) [#9]
some guys on the forum talk of rebuiling/compiling mods
I think only if you have rebuilt the the rest. However do you have the last GUI from here? Or the last public one from the other site?


freedo(Posted 2011) [#10]
it came from sourceforge and is 142 beta vers


Warner(Posted 2011) [#11]
In your "c:\blitzmax\mod" folder the subfolder name should be:
"maxgui.mod"
Within that folder, the subfolders:
"cocoamaxgui.mod"
"drivers.mod"
...
"win32maxgui.mod"

To rebuild modules, press Ctrl+D in the BMX IDE, or select "rebuild modules" from the system menu. Then wait until it's compiled.
If that doesn't help, try enabling debug mode, also from the IDE menu, to see if you get a more descriptive error message.


freedo(Posted 2011) [#12]
cheked files in directory all present.....

cant rebuild modules....ctrl + d has no effect...

in programs menu the build & rebuild modules are not hilighted..

as in they are light grey not selectable...?


Warner(Posted 2011) [#13]
Ah, do you have (the right version of) MinGW installed? I had trouble with that when I switched to Blitzmax.
Edit:
This links can maybe help, easiest first:
http://www.blitzmax.com/Community/posts.php?topic=79814
http://www.blitzmax.com/Community/posts.php?topic=90964

Last edited 2011


H&K(Posted 2011) [#14]
it came from sourceforge and is 142 beta vers

You dont have to rebuild if you have never rebuilt before IF you have a built MaxGUI.
Now I know it is free ATM, but I bought it so I still use the last one released as a paid for product (1.41). AS such I dont know if the sourceforge one is prebuilt or not.

As Warner said you need the right (well one of the right) MinGW.


Sorry I couldnt be more helpful

Last edited 2011