Results 1 to 11 of 11

Thread: Resources or text file?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2001
    Location
    Catalonia
    Posts
    397

    Resources or text file?

    We are developping applications which have a 98% common for all the users and a 2% made special for each customer.

    One of the things we need to make is to change controls captions one the exe is generated and the application running at the customer computer.

    I have two ideas and I will ask you which do you thing will be the better or any other one which can be better

    1.- Use resource files. I think they are included inside the exe so it will not be possible to update them without regenerating the exe. I am right?

    2.- Use a text file which is loaded at the application start and contains all the captions.
    Josep Mª

  2. #2
    Frenzied Member oh1mie's Avatar
    Join Date
    Sep 2001
    Location
    Finland
    Posts
    1,043
    I'm using textfile, then customer can make changes by him self
    oh1mie/Vic


  3. #3
    Banned Michael_Kamen's Avatar
    Join Date
    May 2001
    Location
    The Netherlands
    Posts
    1,180
    oh1mie,

    How do you do it then, with these captions?
    I mean what happens if the customer (accidantely) changes the structure of your textfile? Does your program depend on a certain structere inside the textfile to combine the correct text with the correct caption?

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2001
    Location
    Catalonia
    Posts
    397
    As I can no get more opinions and my first though was to use text files I will work on this way.

    Michael, I think it is easy to protect the file against customer manipulation, for example keeping it as read only with a .dll extension inside the Windows directory. Otherwise in my applications captions will not be critical as they will not be used in the code.
    Josep Mª

  5. #5
    Fanatic Member SeaHag's Avatar
    Join Date
    Jul 2001
    Location
    Lake Huron
    Posts
    901
    options.

    1. use database (easy)
    2. TExt file (easy)
    3. Registry (easy)
    4. Res files (easy)

    Whith all 4 you`ll have to update something...
    Just depends on how U want to do it.. And Who is doing it..

    What do you feel comfortable doing

    Seahag

  6. #6
    Lively Member knochenfish's Avatar
    Join Date
    Apr 2001
    Location
    Cologne
    Posts
    77
    Hello all,

    btw, never learned something about these RESOURCE-stuff. Any advice out there?

    Thanks and greetings

    Wolf
    The goal of Software Engineering is to build something that will last at least until we've finished building it.

  7. #7
    Frenzied Member John McKernan's Avatar
    Join Date
    Jan 2002
    Location
    SE PA
    Posts
    1,295
    Originally posted by knochenfish
    Hello all,

    btw, never learned something about these RESOURCE-stuff. Any advice out there?

    Thanks and greetings

    Wolf
    Have you seen this?
    http://www.vbforums.com/showthread.p...ghlight=seahag

  8. #8
    Lively Member knochenfish's Avatar
    Join Date
    Apr 2001
    Location
    Cologne
    Posts
    77
    Thanks John,

    to tired to check out tonite. But any help is welcome...

    thx again!

    Wolf
    The goal of Software Engineering is to build something that will last at least until we've finished building it.

  9. #9
    Frenzied Member John McKernan's Avatar
    Join Date
    Jan 2002
    Location
    SE PA
    Posts
    1,295
    glad to, hope it helps

  10. #10
    Frenzied Member oh1mie's Avatar
    Join Date
    Sep 2001
    Location
    Finland
    Posts
    1,043
    Originally posted by Michael_Kamen
    oh1mie,

    How do you do it then, with these captions?
    I mean what happens if the customer (accidantely) changes the structure of your textfile? Does your program depend on a certain structere inside the textfile to combine the correct text with the correct caption?
    I'm using ini file like a:

    [Captions]
    OriginalCaption=YourCaption
    OriginalCaption1=YourCaption1
    ......
    oh1mie/Vic


  11. #11
    Stryker
    Guest
    I think that an INI file would probrably suit best for this job. A user opens it and sees the structure, and noramlly they wont play, but if they do play, the failed read for the vlaues wont produce an error, so you can set default vlaues on a failed read.

    Alternatley, if someone really wants to change it ... the option is there, and its easy enough to find the info that they want to edit without trampling other settings.

    Registry is another good way to do this, especially since most people dont play around in there.

    Anyhows ... I've attached a module (which probrably even works) that contains ini read/write functions, and registry read/write functions.

    for INI files, use writeINI and readINI, and for the registry, use writeREG and readREG.


    Hope this helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width