Import Issue
Monkey Forums/Monkey Programming/Import Issue
| ||
I sometimes run into a problem with import. I have a chunk of code related to spritesheets, called "imagegrid." I would like to split this out into a separate source file and call it with import. The import statement is near the top of my code, thus: import imagegrid But then when I attempt to create an instance of the imagegrid thus Global testgrid:imagegrid=New imagegrid I get the following error: Error : Type 'imagegrid' not found At the top of my imagegrid.monkey file I am indeed importing main. This is not a barnburner but does anyone know what this might be? |
| ||
What's a barnburner? I suspect it's the don't name the file the same Case as the Class. Class ImageGrid vs. Class imagegrid, (call the file all lower caps). |
| ||
A barnburner means that your operation is finished until you get a new barn. In this case I had a workaround. Your solution worked. It's a good thing errors like this exist because otherwise everybody would be able to program. :) |