Parameters in the method that is called New

BlitzMax Forums/BlitzMax Beginners Area/Parameters in the method that is called New

Yue(Posted 2015) [#1]
Hello, do not know how to pass parameters in the method with the name "New", which creates an object that I created a window.

Something tells me I'm doing something wrong, because I can not set parameters for setting characteristics of the window when the object being created.

Any suggestions?




degac(Posted 2015) [#2]
You can't pass parameter with 'New'
You need to bypass this with something like 'Create' that implements New and assign parameters


Function  Create(x:Int,y:Int,w:Int,h:Int)
		
		Local wt:Tventana=New Tventana
		wt.x=x
		wt.y	
		   
		wt.objGUI:TGadget = CreateWindow("Windows APP",0,0,500,500,Null,WINDOW_CENTER | WINDOW_RESIZABLE | WINDOW_TITLEBAR)
  	
	End Function



ziggy(Posted 2015) [#3]
listaGUI is not defined anywhere, if I'm now wrong.