Problem with Import
BlitzMax Forums/BlitzMax Programming/Problem with Import
| ||
Heyho, i want to do something like the following without "include", are there any possibilities? a.bmx import "b.bmx" type A field zB:B endtype b.bmx import "a.bmx" type B field zA:A endtype thanks for reading |
| ||
No. |
| ||
well, this sucks its so easy in java or c++ |
| ||
If the types are that related that they must reference each other, you should certainly not have them in separate files. |
| ||
If the types are that related that they must reference each other, you should certainly not have them in separate files. There are way around that of course... It's a design thing. |
| ||
cant you just include B.bmx in a then import a? |
| ||
Could do something like this: SectionName.bmx SuperStrict Include "SectionName+A.bmx" Include "SectionName+B.bmx" SectionName+A.bmx Type A Field zB:B End Type SectionName+B.bmx Type B Field zA:A End Type Then just import whatever SectionName.bmx is. |
| ||
Brucey, Can you elaborate? I'm having a similar problem with the Nate the Great's verlet Max integration into TileMax... I've had to modify verletMax to include references to TileMax MapTiles in place of his grid system which means I can no longer "compile" verletMax independently. |
| ||
nilium, this is better than just including, but honestly i dont really like it :D |
| ||
_Skully; you could cover this situation by writing a base "grid_interface" type that has virtual methods for all the required functionality. Then for testing, derive a working type using Nate's current code (or ask him to break his grid code down in this way ;) .) VerletMax will need an instance of grid_interface and must use it throughout. TileMax can then derive it's own grid_interface type and ask VM to use that instead. |