reffering to instance of a type
Blitz3D Forums/Blitz3D Beginners Area/reffering to instance of a type
| ||
I have a type that stores all my graphics, called a GraphicsPile, and an instance of that is called TileGraphics, and is global. I want to keep a reference to it in some other types as I declare them, how can I make it so that I pass it a reference to TileGraphics and not just code in that it uses TileGraphics? |
| ||
I think you need to define better what it is that you are trying to achieve. Try writing some code. Do you mean something similar to this:?Type GraphicsPile Field a Field b Field c End Type Global TileGraphics.GraphicsPile = New GraphicsPile Type OtherType Field a Field b Field reference End Type othertypetypeinstance.OtherType = New OtherType othertypetypeinstance\reference = TileGraphics |
| ||
In the othertype example above you need to change the field reference to field reference.GraphicsPile for the above to work. Cheers Stevie |
| ||
So, (and this really helps with my other issue... If (providing the Type is specified as Global), the Field is superceded by .(instance), you can noominate and specify the particular instance anywhere else in your code/functions? |
| ||
If (providing the Type is specified as Global), the Field is superceded by .(instance), you can noominate and specify the particular instance anywhere else in your code/functions? I don't know what you are asking but .(instance) is actually .(type) |
| ||
Malice, I posted some code in your other thread, in case you haven't seen it already. |
| ||
Thanks, got it now |
| ||
Great!!! Thanks Big10p, just seen it now! |