This content has been marked as final. Show 4 replies
I was also having this problem, and solved creating a folder called 'myclasses' outside the project folder. Then I insert it in the "source path" of my project.
Anyway, I'm also looking for a better way, if it exists.
thanks for the answers!!!!!
this is a good work around, but i want to create more than one subfolder and under src "master" folder in order to organize my project in best way...
I think that this possible must exists, and probably we must work with the packages, but i don't know in what way...
Anyone know this please?
Caio!!!!, i resolve!!!!! [very very newby problem]
In fact FLEX use subfolder as package name. So, if i create, for example, subfolder Database, all file in this folder must have the package name Database
public class DatabaseHandler
this file must be in src/Database folder.
Then where i use my class "DatabaseHandler" i must import package, like:
And all works fine!!!!!
Very good! I misunderstood what you need. lol
This I already knew how to do, I thought you was trying to organize all your packages in a subfolder inside the project folder, like I did.
Inside the "myclasses" folder I said, I have many packages. For sample, I was using the GreenSock's gs.TweenLite class ( http://blog.greensock.com/tweenliteas3/), so I couldn't change the package "gs." to "myclasses.gs.".
Just clarifying one thing you said, FLEX does NOT organize the packages in subfolder, this is an OOP conception. If you create a class with the package "package my.long.path.class" you must put your class in the folder "my/long/path/class", on your src folder. Maybe you already know that, if don't you know now.
One other thing, you don't need to import all the package with the "import Database.*;" you may also import only a specific class into the package by "import Database.DatabaseConnector", in this case, DatabaseConnector would be the class.