At 5:57 PM -0500 26/3/06, [EMAIL PROTECTED] wrote:
Excuse me for my "spell-it-out-ism", but you're saying that I can
compile an application and have RB "compile" it into another
application? And if it doesn't recognize it, I "write it out"
again as another binary to use later?
That's exactly what I thought when I first heard about it! But yes,
you can "store" a file inside your compiled application, and you can
write it to the hard drive as a binary file.
A common use for this feature is when you have a default, or blank,
file, for example, a database. Instead of creating a new one from
scratch, which could take a significant amount of code, you simply
write the copy that's embedded in your app to the hard drive as a
file.
When the file is compiled in your app, it is available as a string
if RB doesn't know what it is. Since a string is actually binary
data, it makes sense that the file can remain intact inside your app
as a string. To write it to the hard drive, simply pass the string
to a BinaryStream that is set up for writing to the hard drive in a
file.
Andrew Keller
Well, I'll be.
Thanks. I'll use this trick rather than having a bunch of CREATE
TABLE code lines that I have to keep in sync with the on-disk schema.
--
Cheers,
Dr Gerard Hammond
Bioinformatic Analyst
Garvan Institute of Medical Research, Sydney, Australia.
If it's worth doing, then it's worth doing with excess.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>