|
-
Aug 21st, 2008, 04:49 AM
#1
Thread Starter
Addicted Member
[RESOLVED] Find "bookmarks" in a text file...
Hi !
I'm building an application with a text box, where users will write comments and descriptions for each item in the app:s database. For the moment this text box is limited to 100 char:s (bytes) depending on its post length in the file (random access).
But giving it an other thoughs; Why not let the text in the box be stored in a text file instead, among text from other items, but separated by some certain bookmark. So when approaching an item in the data base, the program calls for this special bookmark in the text file, reading the text and deliver it in to the text box again. The bookmarks will then be stored in the ra-file or even in the data base file itself...
Then I can keep the box unlimited and its text will be stored more compressed than in a file with certain post length, especially if the text is shorter than 100 char:s - as most often...
There is at least two question marks.
One is if a user will change the text somehow, maybe make it shorter or longer. Then the text will be fit in again to the text file, replacing the old piece... Maybe moving the after coming texts forward or backward..
An other question is how to find a certain bookmark in the text file, reading all text to the next bookmark (or to the end, if it's the last one)
I think I can write some rough code and make it all works, but I'm sure that someone here have some lot smarter ideas how to manage it all... Am I right...? !
Thanks in advance
/Kalle in Sweden
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|