In other versions of Blitz, I experienced some limtations with types and started using banks for all my structures.
For example, if I have a field in a type that needs to be able to reference multiple types of objects, it isn't possible:
If "target" is a .terrain, I can't reference it, unless I use Handle() to store the object integer handle. Then when I am using the target value, I have to do this mess:
If I use banks, I can just do this:
Also, types don't work well if you are controlling the application with a script, or (theoretically) compiling it to a dll.
Has anything changed in BlitzMax that makes this different? Am I overlooking anything important?
For example, if I have a field in a type that needs to be able to reference multiple types of objects, it isn't possible:
Type thing Field target.otherthing
If "target" is a .terrain, I can't reference it, unless I use Handle() to store the object integer handle. Then when I am using the target value, I have to do this mess:
If Object.terrain(thing\target)<>Null If Object.mesh(thing\target)<>Null If Object.texture(thing\target)<>Null
If I use banks, I can just do this:
target=PeekInt(thing,THING_TARGET) class=PeekInt(target,OBJECT_CLASS)
Also, types don't work well if you are controlling the application with a script, or (theoretically) compiling it to a dll.
Has anything changed in BlitzMax that makes this different? Am I overlooking anything important?