Employee Directory is an AIR sample application from which I learned a lot. (try it) Here I post some of what I learned here.
5.1 event bubble
5.2 event clone
6 modify ED for your own purpose: custom field
10 Replies to “Learning Employee Directory Series”
Thanks a lot for breaking this robust app down!
I downloaded the source code and did not know where to start, but thanks to you I now have a better understanding of it all.
One question I do have is: How can I go about making the ED sync/refresh the database every time I make changes to the “employee.csv.zip” file?
I keep changing the data in the csv.zip files, but it isn’t reflected when I run the app.
After you change csv.zip, try delete ED folder from your application storage directory. On my computer, it is
C:\Documents and Settings\Xu Cui\Application Data\employeedirectory\
You should see the change. I checked this on my computer.
Thanks for the quick response, Cuiixu!
Would you happen to know what folder that would be on a Mac?
Try trace(File.applicationStorageDirectory.nativePath) in your application in debug mode.
Once installed, does the Air App updated itself when the data changes? Or do you have to uninstall and re-install it every time you make changes to the list of employees?
Really appreciate your breakdown of this. I was also having problems with the data not refreshing and just found the problem, if anyone’s interested. In the file
The database name is specified as “employeedirectoryM6.db” and once you run the program this file just hangs around in your AppData folder, which is why deleting the folder refreshes the data. However there’s a better way to force the refresh by adding a moveToTrash()to
the DatabaseConnectionManager method, like so
dbFile = File.applicationStorageDirectory.resolvePath( DBPATH );
This way the file gets refreshed every time without having to re-install. Hope this helps someone else.
Thank you. It’s useful.
I ran in trouble after installing new field and now i can’t refresh any data…
My question to XuCui is… Did you work around the embedded refresh button[i+logo method]?
my problem is triggered when I try to refresh the DB using the i+logo method.
[InsertEmployeeDataCommand : : An error occurred executing the SQL : 3115 :]
BTW Joel’s way worked like a charm and actually fixed my error:3115 ?!?!
As crazy as it sound once the ..M6.db was refreshed the Error (that i ve been researching for solution for over 4 days) miraculacy disappeared.
that makes me think that my …M6.db was corrupted in some ways and was just making everything go basurk!!!
Shot in the dark, i know you it’s getting old, but i almost finished my app and it’s working fine…
I am trying to make everything neater..and there’s something that bug me real bad about the pictures from ED…
Why the hell do every pictures are jagged? i can’t have all member of my directory with lazy eyes and forehead cropped out like freaks.
Have you notice that? did you look around, any insight on what cause that?
Anyways any comment would be appreciated.