Home › Forums › TimelineFX Module › Question regarding import, include and multiple files › Re: Re: Question regarding import, include and multiple files
@redspark wrote:
@thomashaaks wrote:
The “circular import” issue sounds to me like a design issue – that Mr Sibly doesn’t want to change.
It’s actually not possible to change it because imports are pre-compiled. Without both types present in the file that form a cyclical reference, the file wont compile. To change the import to allow it to import uncompiled code, gives you the same thing as an included file. So they are really designed for two different purposes.
Hi Redspark, first thanks a lot for the workaround suggestions – that will surely help me.
The suggestion of the Global game object isn’t cheating so much – using OO design patterns you call that a Singleton which is indeed nothing else but a global variable accessible from everywhere like
MyGlobalClass.GetSingleton();
😉
But still I’m convinced that technically there would be a way around the “circular import” problem – other languages like Java, C# or C++ handle those issues fine. It would just require a multi-pass compiler/linker IMHO. To solve this problem it would surely imply quite some work from BRL/Mark Sibly. But anyway, this is not to be solved by us.
Thanks again for your helpful answer – my question is solved 😀
Cheers,
Thomas