Results 1 to 1 of 1

Thread: [RESOLVED] Question about storing data in your project->

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Feb 2003
    Posts
    1,807

    Resolved [RESOLVED] Question about storing data in your project->

    EDIT:
    Ignore this thread. I found a workable solution.

    Hi,

    At the moment I am updating an older project of mine and a coding technique I used finally made its limits apparent. Let me try to explain the issue I am facing:

    There is a pretty large amount of hard-coded information I need to deal with. The first part is an enumeration containing 38 items:
    1. The value's name.
    2. The actual value, an integer to specific.
    3. Each item has a comment serving as a description.

    The second part is a dictionary which stores yet another integer value for each item in the enumeration.

    This wouldn't have been much of a problem if I hadn't needed to update every single integer stored. There must be a better way to store all that information, and I had some kind of table in mind, with columns something like:

    Name: - Integer Value 1: - Integer Value 2: - Description:

    I can see several options, but there are a few things I would like to avoid:
    1. Yet another difficult to maintain hard-coded mess.
    2. No external files unless they can be integrated into the project as a resource.
    3. It should be fairly easy to copy-paste the data back and forth between some external program such as Excel for the purpose of updates.
    4. It should be easy to read the values in code. In anoher words: I am not looking forward to writing yet another text file parser.

    Anyone know of a method that meets the above conditions?

    Thank you, and yours,
    Peter Swinkels
    Last edited by Peter Swinkels; Sep 6th, 2020 at 01:00 PM.

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