Menu

#13 Save int as it's alias

Next release
open
None
5
2005-05-26
2005-05-26
No

I need to have a function that will save an int value
as it's alias:

If I have the following code:

configSource.Alias.AddAlias ("Closing", "Close
Application", 0);
configSource.Alias.AddAlias ("Closing", "Logoff", 1);
configSource.Alias.AddAlias ("Closing", "Shutdown", 2);

Then when writing:
formConfig.Set("Closing Method", 2, true);

or even:
formConfig.Set("Closing Method",
configSource.GetAliasValue("Shutdown"), true);

I expect to see "Shutdown" in the the ini file...

Discussion

  • Brent R. Matzelle

    • milestone: --> Next release
    • assigned_to: nobody --> bmatzelle
     
  • Brent R. Matzelle

    Logged In: YES
    user_id=163900

    That is a very good idea. I have been looking for a
    solution to do this in my own program at work. I'll add a
    version of this to the API for the next version.

    I'm not sure if I can effectively add your first example
    (the formConfig.Set one), however, I would expect that the
    second example would look something like this (slightly
    different than your version):

    formConfig.Set("Closing Method",
    configSource.Alias.GetString("Closing",
    "Shutdown"));

     

Log in to post a comment.

MongoDB Logo MongoDB