App's with lots of strings. How?

Please support our Pascal and Delphi advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Oct 2008
Posts: 35
Reputation: m610 is an unknown quantity at this point 
Solved Threads: 1
m610 m610 is offline Offline
Light Poster

App's with lots of strings. How?

 
0
  #1
Mar 16th, 2009
I've got a lot of text to display in an app I am working on. I know that this eats of resources so I'd like to put them somewhere else, like maybe a file that I stuff into the resource file, if that is possible. Also, I'm thinking to the future where I do a multi-language version.

So my question, how is this generally done? Do I move the text to a file and store it in the resource file? Does this file include text-line numbers that my app would use to locate the string it needs, etc.?

That's how I figure it is done, but I have no idea of how people actually do it. How is it done?

Thanks.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 473
Reputation: FlamingClaw will become famous soon enough FlamingClaw will become famous soon enough 
Solved Threads: 114
FlamingClaw's Avatar
FlamingClaw FlamingClaw is offline Offline
Posting Pro in Training

Re: App's with lots of strings. How?

 
0
  #2
Mar 16th, 2009
Delphi Or Pascal this is the question...?....
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 35
Reputation: m610 is an unknown quantity at this point 
Solved Threads: 1
m610 m610 is offline Offline
Light Poster

Re: App's with lots of strings. How?

 
0
  #3
Mar 16th, 2009
Delphi. Sorry.

And obviously I don';t want to put the strings in a text file that someone can get at, or loose.

I guess a DLL is another possibility.
Reply With Quote Quick reply to this message  
Join Date: Feb 2009
Posts: 473
Reputation: FlamingClaw will become famous soon enough FlamingClaw will become famous soon enough 
Solved Threads: 114
FlamingClaw's Avatar
FlamingClaw FlamingClaw is offline Offline
Posting Pro in Training

Re: App's with lots of strings. How?

 
0
  #4
Mar 16th, 2009
I'm not really good in Delphi but I think I can help you a bit
If you click this page then you can read about a way to resolve your problem
http://delphi.about.com/od/windowssh...dll_basics.htm
Last edited by FlamingClaw; Mar 16th, 2009 at 3:24 pm.
Reply With Quote Quick reply to this message  
Join Date: Oct 2008
Posts: 35
Reputation: m610 is an unknown quantity at this point 
Solved Threads: 1
m610 m610 is offline Offline
Light Poster

Re: App's with lots of strings. How?

 
0
  #5
Mar 17th, 2009
Thanks. I could probably use a DLL that contains one function and all it does is return a string from a massive string constants array. That would work better than creating a text file and searching through it to find a string, such as searching for a string that starts with an ID code, then grabbing the rest of it.

My basic concern is using up data space in my app with all these strings. Does moving these strings/string array to a separate DLL help me get around that problem?
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 68
Reputation: jsosnowski is an unknown quantity at this point 
Solved Threads: 11
jsosnowski's Avatar
jsosnowski jsosnowski is offline Offline
Junior Poster in Training

Re: App's with lots of strings. How?

 
0
  #6
Mar 19th, 2009
Another possibility would be to create a small database structure and placing the items in a database file. IF you have not explored database managment in Delphi yet, then this would be a good opportunity to do so.

You may also want to reconsider the idea of user access. Many programs store all text prompts in separate files to allow easy conversion between languages. In some commercial programs, it is possible to modify these text strings to customize them for applications or terminaology within a company. Also, if a user is going to loose a file he is no more likely to loose a text file than the dll you create and can always restore the oringal to his directories if he/she does.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Pascal and Delphi Forum


Views: 485 | Replies: 5
Thread Tools Search this Thread



Tag cloud for Pascal and Delphi
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC