It worked , but i have problem creating file in current folder on emulator because disk "Z" is read only, my application creates and writes to files, and i like to have that files in subdir of application directory, how can i set CodeWarrior to transfer my application to drive "C" on emulator instead of "Z" after compilation. On real device it works ok. Is there some pkg file that CW use to copy files to emulator or
Is it ok to have fixed paths in app. , is it usual on Symbian phones to copy application folder in different drive (folder) and expect it to work? or it is bather to have all paths dynamicly created from "CEikApplicaiton::AppFullName()"
As for the different drives: Well, as soon as you have a phone with more than one drive, e.g. like my P900 with the memory stick as a second drive D:, the installer gives the user the free choice of drives. If I use this free choice, choose D:, but the application does not work because C: is hardcoded, I as a user would consider this a bug.
As for the Z: drive problem: You may have your reasons why you want your application to create files in a subdir of the application directory, but this is not the recommended "Symbian" way of doing it, and I think if you stick with this, in the long run you will run into all kind of troubles, not only this first problem of your application going to the emulator read-only Z drive (for which I don't know a solution, anyway).
You may have your reasons why you want your application to create files in a subdir of the application directory, but this is not the recommended "Symbian" way of doing it
What is recommended "Symbian" way? In others platforms it is usual that if you have some files for example game tables , saves , data all that files go to application directory or subdirectory.
Each application gets a default document directory, for an application called "Test" this will be C:\System\APPS\Test.
In the simple case where your application only has some simple data to load at startup and write back after modification only the following is necessary: Give a file name in the .rss file, e.g. RESOURCE TBUF { buf="TestConfig"; }, and then write InternalizeL and Externalize methods for the Document class.
Everything else is automatic: The application framework will create the directory C:\System\APPS for you, if it does not yet exist, will create a file "TestConfig" there for you, will open it, call your InternalizeL method at program startup, etc.
Forum posts: 22
Forum posts: 29
It worked , but i have problem creating file in current folder on emulator because disk "Z" is read only, my application creates and writes to files, and i like to have that files in subdir of application directory, how can i set CodeWarrior to transfer my application to drive "C" on emulator instead of "Z" after compilation. On real device it works ok. Is there some pkg file that CW use to copy files to emulator or
Is it ok to have fixed paths in app. , is it usual on Symbian phones to copy application folder in different drive (folder) and expect it to work? or it is bather to have all paths dynamicly created from "CEikApplicaiton::AppFullName()"
Forum posts: 1321
As for the Z: drive problem: You may have your reasons why you want your application to create files in a subdir of the application directory, but this is not the recommended "Symbian" way of doing it, and I think if you stick with this, in the long run you will run into all kind of troubles, not only this first problem of your application going to the emulator read-only Z drive (for which I don't know a solution, anyway).
René Brunner
Forum posts: 29
What is recommended "Symbian" way? In others platforms it is usual that if you have some files for example game tables , saves , data all that files go to application directory or subdirectory.
Forum posts: 1321
In the simple case where your application only has some simple data to load at startup and write back after modification only the following is necessary: Give a file name in the .rss file, e.g. RESOURCE TBUF { buf="TestConfig"; }, and then write InternalizeL and Externalize methods for the Document class.
Everything else is automatic: The application framework will create the directory C:\System\APPS for you, if it does not yet exist, will create a file "TestConfig" there for you, will open it, call your InternalizeL method at program startup, etc.
For more complicated cases probably this code can give quite some hints how to manage multiple documents:
http://discussion.forum.nokia.com/forum/showthread.php?t=3995
René Brunner
Forum posts: 1321
Ops... the document directory will be C:\Documents\Test of course...
René Brunner