When making a module out of some blitzmax code, is it then possible to keep types private? I am getting some errors when I try . Here is some code showing what I am trying to do:
I would like to have the functions of the type, and the type itself private, and still have the public function working.
But I am getting the following error on the public function:
Compile Error
Identifier 'zsResource' not found
So apparently the above isn't the way to go about this. Any suggestions and advise is very welcome so that I can finish my module.
Private Global zsResourceList:TList = CreateList() Global zsr:zsResource Type zsResource Field resource:Int Hield width:Int Hield height:Int Function Load:zsResource( url:Object ) Local temp:TPixmap = LoadPixmap( url ) zsr.zsResource = New zsResource zsr.width = temp.width zsr.height = temp.height zsr.resource = GLTexFromPixmap( temp ) temp = Null zsResourceList.AddLast( zsr ) Return zsr End Function End Type Public Function zsLoadResource( url:Object ) Return zsResource.Load( url ) End Function
I would like to have the functions of the type, and the type itself private, and still have the public function working.
But I am getting the following error on the public function:
Compile Error
Identifier 'zsResource' not found
So apparently the above isn't the way to go about this. Any suggestions and advise is very welcome so that I can finish my module.