Re: using Container object for Strings? [message #52874 is a reply to message #52869] |
Thu, 08 March 2007 09:52  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Laurens writes:
> It must be that i'm too sleepy or worked too much this day, but i'm
> missing something here...
>
> I want to load, get, set and save some settings into my program and i'm
> doing so using an xml-file. All good there, code looks good and looks
> like its workin allright.
>
> Now I want every setting I read being put into an IDL container, one
> container for the setting name, one container for the value. I like the
> idea of an container for that it manages its size automatically and - I
> though of it as a feature - that I could use isContained("name",
> POSITION=pos) to find elements.
>
> Now, appearantly I was wrong. First of all, it seems i can only put
> objects into that container as it doesn't accept a string. There flies
> the idea of searching in a fast way. Second, well there really is no
> second...if I can't store strings, I can't store any names nor any
> values (all settings are stored as string).
>
> Now, am I thinking to complicated, or is there a workaround to put
> strings into those containers and keep the nice "isContained" searching
> (which its function I probably just misunderstood)?
>
> Looking forward to some wise thoughts :)
You are probably looking in the wrong place for wise thoughts,
but IDL_Containers are just for objects. Seems to me you
want to build some kind of hash object. I seem to recall someone
doing it before, but I can't find a reference.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|