|
- 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° 21 -------- 19/04/2007 @ 00:12 by Stewe
visitor |
Hey,
So, I think the "type" doesn't really matter. Or shouldn't :) Not sure, though.
This is how I add a new record to a saved game: (input: id, data, len)
UInt16 recnum=0; MemHandle hrec=DmNewRecord(pDb,&recnum,len); UInt32 rid=id; DmSetRecordInfo(pDb,recnum,NULL,&rid); void *prec=MemHandleLock(hrec); DmWrite(prec,0,(const void *)data,len); MemHandleUnlock(hrec); DmReleaseRecord(pDb,0,true);
Using similar steps, I'm sure this record can be duplicated. The order of the records doesn't matter.
Stewe
|
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 22 -------- 20/04/2007 @ 15:42 by doeni
visitor |
aldweb, could you code that? *hope* |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 23 -------- 20/04/2007 @ 23:28 by aldweb
visitor |
Hello,
Thanks to Stewe for sharing this piece of code that confirmed that he is updating the Record Unique ID. Stewe, for your information, here is what is written in the Palm OS Reference, in the DmSetRecordIndex paragraph: Comments: Sets information about a record. Normally, the unique ID for a record is automatically created by the data manager when a record is created using DmNewRecord, so an application would not typically change the unique ID. So, usually, developers will work either with the record index or some information stored in the record to get to know which information they are working on.
Doeni, I have updated the PP applet accordingly (that was easy, only 3 lines of code to add). You may download it again here: izibasic_fileapplet.zip
Cheers, aldweb
|
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 24 -------- 21/04/2007 @ 17:27 by doeni
visitor |
Thank you so much!
Everything works fine now.
Thanks alot for the great help |
|
|
Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Answer n° 25 -------- 21/04/2007 @ 17:49 by aldweb
visitor |
Good news Thanks for the feedback.
Cheers, aldweb
|
|
|
topic active
topic closed
Sticky
New message -
Correct message
Close topic
Make sticky
|
|