wxConfig question

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
spectrum
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 207
Joined: Sat Jul 21, 2007 12:17 pm

wxConfig question

Post by spectrum » Wed Dec 18, 2013 5:25 pm

Dear all,

i would need that wxConfig keep stored a list of strings in a certain order, the same i write to it. But i see, at reload, the order never change since it is "map/key" based.

Any idea on how to keep saved a sorted list of strings(key) + string(value) ?

Thanks,
Angelo
spectrum

User avatar
doublemax
Moderator
Moderator
Posts: 15259
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: wxConfig question

Post by doublemax » Wed Dec 18, 2013 6:29 pm

I don't think this is possible with wxConfig/wxFileConfig.
Use the source, Luke!

DavidHart
Site Admin
Site Admin
Posts: 4008
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: wxConfig question

Post by DavidHart » Wed Dec 18, 2013 7:29 pm

Hi,

I use the method described in this old thread. In your case you'd either have to adapt that to use a numerical key (rather than "aaa" etc.) or else have a structure like:

Code: Select all

[SomePath/aaa]
mykey=123
myvalue=foo
[SomePath/aab]
mykey=456
myvalue=bar
Regards,

David

Post Reply