|
- Forum - iziBasic
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257
Topic # 1526 |
ANY way to use COPY command on non-"data"-files? |
10/04/2007 @ 17:19 by doeni
|
Is there ANY way to copy files, that are not of "data" type?
In this case, it's "ThQS".
It's really important :(
|
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 1 -------- 10/04/2007 @ 23:17 by aldweb
visitor |
Hello doeni,
Indeed, the COPY statement is limited to the "data" type, mainly for 2 reasons: 1. to avoid people to delete important applications of system files by mistake 2. and also because copying database files and resources files is not exactly the same thing (although it is fairly easy to detect the type of file and have the code copy each record or resource accordingly)
So, to proceed anyway, you could use a PP applet. Then, you might want to give a look to the Lychee framework source code. As far as I remember it does have 2 routines to copy database & resource files.
Cheers, aldweb
|
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 2 -------- 11/04/2007 @ 19:20 by doeni
visitor |
I searched through the framework, but i did not find anything that looked like a copy command. (I don't know anything about PP applet...)
I now have completed the code as it would work in izibasic. It works perfect with "data" files.
Maybe someone who knows how to use PP applets could take a look at the code?
I now also need a way to KILL "ThQS" files... |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 3 -------- 11/04/2007 @ 21:49 by Khertan
visitor |
You can look too at the source code of Bird wich include a duplicate database function. |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 4 -------- 11/04/2007 @ 22:05 by aldweb
visitor |
Good advice Khertan. By the way, the same advice to dig into Bird's source code applies for deleting a file
Cheers, aldweb
|
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 5 -------- 12/04/2007 @ 12:42 by doeni
visitor |
i found this:
// data function DmCloseDatabase(dbP:DmOpenRef):UInt16; inline(SYSTRAP,$A04A); function DmCreateDatabase(cardNo:UInt16;const name:String;c,t:UInt32;resDB:Boolean):UInt16; inline(SYSTRAP,$A041); function DmDatabaseInfo(cardNo:UInt16;dbID:LocalID;var name:String;var attributes,version:UInt16;var crDate,modDate,bkpUpDate,modNum:UInt32;var appInfoID,sortInfoID:LocalID;var t,c:UInt32):UInt16; inline(SYSTRAP,$A046); function DmSetDatabaseInfo(cardNo:UInt16;dbID:LocalID;var name:String;var attributes,version:UInt16;var crDate,modDate,bkpUpDate,modNum:UInt32;var appInfoID,sortInfoID:LocalID;var t,c:UInt32):UInt16; inline(SYSTRAP,$A047); function DmDeleteDatabase(cardNo:UInt16;dbID:LocalID):UInt16; inline(SYSTRAP,$A042);
Is it that what you mean? I could not find a copy/duplicate function..
And how do i have to implantate it in my izibasic code? (I'm totally unexperienced in that PP stuff :( ) |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 6 -------- 13/04/2007 @ 00:17 by aldweb
visitor |
Hello doeni,
What you provide is a list of Palm OS APIs that can be called from a PP source code. The DmDeleteDatabase can be used to kill any application, this is the single API to use in this case.
For the CopyFile one, rather search for the DuplicateDB procedure in the builder.pas file.
Then, please read the chapter about PP applets in the iziBasic user manual to see how to implement it, also download the PP applets sample package, this will help you get started.
If you face too many difficulties, then please let me know and I will develop this PP applet for you.
Cheers, aldweb
|
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 7 -------- 13/04/2007 @ 10:11 by doeni
visitor |
I'll try.
Many thanks for the answers. |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 8 -------- 13/04/2007 @ 13:16 by doeni
visitor |
Huh, where can i donwload the sample package?
Can the APIs work with textvariables defined in Izibasic?
BEGIN INPUT A$ <here the API that is similar to "KILL A$"> END |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 9 -------- 13/04/2007 @ 13:16 by doeni
visitor |
Huh, where can i donwload the sample package?
Can the APIs work with textvariables defined in Izibasic?
BEGIN INPUT A$ <here the API that is similar to "KILL A$"> END |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 10 -------- 13/04/2007 @ 13:18 by doeni
visitor |
Found the package, sorry for the double post |
|
|
topic active
topic closed
Sticky
New message -
Correct message
Close topic
Make sticky
|
|