[ wxwindows-Bugs-1685312 ] wxFileConfig::DeleteGroup not reacting as
expected
SourceForge.net
noreply at sourceforge.net
Tue Apr 17 06:02:16 PDT 2007
Bugs item #1685312, was opened at 2007-03-21 16:46
Message generated for change (Comment added) made by g00fy
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1685312&group_id=9863
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Common
Group: Must fix
Status: Open
Resolution: None
Priority: 7
Private: No
Submitted By: Steven Van Ingelgem (g00fy)
Assigned to: Nobody/Anonymous (nobody)
Summary: wxFileConfig::DeleteGroup not reacting as expected
Initial Comment:
Please find the proof of concept attached hereby (against minimal sample).
Basically it is if you do a DeleteGroup on a wxFileConfig, and then add new items into the just deleted group, that you get rather weird results.
Expected results:
Step 1:
[Config]
A=1
[User]
U0=test-value
U1=test-value
U2=test-value
U3=test-value
U4=test-value
Step 2:
[Config]
A=1
Step 3:
[Config]
A=1
[User]
U0=test-value2
==> Step 3 gives:
[Config]
[User]
U0=test-value2
A=1
Greetz,
Steven
----------------------------------------------------------------------
>Comment By: Steven Van Ingelgem (g00fy)
Date: 2007-04-17 15:02
Message:
Logged In: YES
user_id=569271
Originator: YES
Investigating more it seems it's going wrong somewhere here:
wxFileConfigLineList *wxFileConfigGroup::GetLastEntryLine()
-> There it thinks it doesn't have a LastEntryLine (which it should have,
namely A=1), so it adds the line "[User]" directly under the "[Config]"
header.
----------------------------------------------------------------------
Comment By: Steven Van Ingelgem (g00fy)
Date: 2007-04-17 14:58
Message:
Logged In: YES
user_id=569271
Originator: YES
It seems this works perfect if the file doesn't exist first, but if you do
this on an already existing file, you get this erroneous behaviour.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1685312&group_id=9863
More information about the wx-dev
mailing list