Hi, is there any way to write a resource database into the palm? i wanna create a database of bitmaps, but i don't know if only setting up a pfgPalmRemoteTable with one custom field of size=0 will make the pdb as 'resource' instead of 'record'.
anyway the main problem is that i don't know how to write the bitmap into the field, since the variants as treated as strings and strings can't contain zeros and my bitmaps do...
i'm so confused!
if only i had the pointer-size parameters in the writefield event i think i could pull it off
God bless you Paul!!! your components are amazing!!!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That's a good question; I'm not exactly sure what the format of a .PRC file is. Certainly you can create a .PDB file containing your images - as you suggest, it merely requires defining a single custom field, and having your read and/or write image routine parse the raw data for the image and save it.
To handle the raw data of the bitmap, use the OnWriteField event - define the out Data parameter as a Variant array of Byte, as in:
Data := VarArrayCreate([0, SizeNeeded - 1], varByte);
You can then set each index of your data array to a particular byte. If you want to write out multiple bytes at once, you may want to use VarArrayLock/VarArrayUnlock, which allows you to access to the raw memory representing the array.
Paul.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, is there any way to write a resource database into the palm? i wanna create a database of bitmaps, but i don't know if only setting up a pfgPalmRemoteTable with one custom field of size=0 will make the pdb as 'resource' instead of 'record'.
anyway the main problem is that i don't know how to write the bitmap into the field, since the variants as treated as strings and strings can't contain zeros and my bitmaps do...
i'm so confused!
if only i had the pointer-size parameters in the writefield event i think i could pull it off
God bless you Paul!!! your components are amazing!!!
Hi there,
That's a good question; I'm not exactly sure what the format of a .PRC file is. Certainly you can create a .PDB file containing your images - as you suggest, it merely requires defining a single custom field, and having your read and/or write image routine parse the raw data for the image and save it.
To handle the raw data of the bitmap, use the OnWriteField event - define the out Data parameter as a Variant array of Byte, as in:
Data := VarArrayCreate([0, SizeNeeded - 1], varByte);
You can then set each index of your data array to a particular byte. If you want to write out multiple bytes at once, you may want to use VarArrayLock/VarArrayUnlock, which allows you to access to the raw memory representing the array.
Paul.