Computer Science Canada

Importing classes from custom library of folders?

Author:  GreatPumpkin [ Sat Mar 22, 2014 10:53 pm ]
Post subject:  Importing classes from custom library of folders?

What is it you are trying to achieve?
I'm trying to import classes from multiple folders in a single main file. It's been working so far, but now I'm trying to import a vehicleClass that references a unitClass from a separate folder.


What is the problem you are having?
I keep getting errors every way I try to import them.


Describe what you have tried to solve this problem
<Answer Here>


Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
<Answer Here>
This is the import for my main file, the on above all my classes:

Turing:


import cursorModule in "classes/cursorModule/cursorModule.tu",
    tileClass in "classes/tileClass/tileClass.tu",
    unitClass in "classes/unitClass/unitClass.tu",
    landUnitClass in "classes/unitClass/landUnitClass.tu",
    vehicleClass in "classes/vehicleClass/vehicleClass.tu",
    buttonClass in "classes/GUIClass/buttonClass.tu",
    GUIClass in "classes/GUIClass/GUIClass.tu"



And these are the import's I've tried in the vehicleClass

Turing:


unit
class vehicleClass
    import unitClass in "classes/unitClass/unitClass.tu"



The error I get is:
Unable to open file ""classes/unitClass/unitClass.tu"" in ["C:/users......../North Island/classes/unitClass/unitClass.tu"].


Turing:


unit
class vehicleClass
    import unitClass



The error I get is:
Unable to open file "unitClass" in [C:/users......../North Island/unitClass"].

Please specify what version of Turing you are using
<Answer Here>

Author:  Raknarg [ Sat Mar 22, 2014 11:00 pm ]
Post subject:  RE:Importing classes from custom library of folders?

Put your code in a zip file and pm me or upload it here

Author:  GreatPumpkin [ Sun Mar 23, 2014 5:24 pm ]
Post subject:  RE:Importing classes from custom library of folders?

I sent you a pm Raknarg.


: