realbasic-nug
[Top] [All Lists]

Re: File Suggestions?

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: File Suggestions?
From: Mark O'Neill <real@rbclass.com>
Date: Tue, 28 Apr 2009 20:42:33 +0100
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <795A2C20-44DF-415D-A45E-9D7D216D6CE7@declareSub.com>
References: <6E706737-CC19-49C6-A92D-7F124CAF6F29@rbclass.com> <795A2C20-44DF-415D-A45E-9D7D216D6CE7@declareSub.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com
Hi Charles,

On 28 Apr 2009, at 19:52, Charles Yeomans wrote:

The first error would be to fail to include file format version information.

Sure. In the current XML version of the document file there is a <program> block which list all of that. Is there a "correct" way write that or any other data for that matter into a binary file or should I just do it how I see fit? For example, I'm guessing that to separate different "fields" in a binary file I'd use a delimiter such as Chr(1) to denote the beginning of field X and Chr(2) to denote the end of that field etc. Is that the best way to delimit? That makes sense for text only blocks but how does one then save a picture into the file as well?

For example, if the document contained the following information: (where each new line should be treated as a new block)

TEXT 1
TEXT 2
PICTURE 1
TEXT 3
PICTURE 2

What would be the best way to save and read that back in a binary file?

Text and XML files I understand, but binary - as I've never used binary files before - is like the great abyss to me at the moment.

Any help appreciated.

All the best,

Mark.
------------------------------------------------------------
RB Class
"Killer Tool Bar" - theme-based x-platform toolbar
www.rbclass.com







_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>