Author Topic: projectfile.cpp Error due to projectioptions  (Read 3313 times)

devilsclaw

  • Guest
projectfile.cpp Error due to projectioptions
« on: March 31, 2007, 12:37:42 pm »
when you goto Project->Properties...

it does not matter if you changed anything when you click ok it processes all the data.

when you click the ok button one of the functions it calls is
Code
    DoBeforeTargetChange(true)

the true mean to force it

in that function it calls
Code
     pf->RemoveBuildTarget(target->GetTitle());

in that function it calls

Code
    buildTargets.Remove(targetName);

wxArrayString::Remove
void Remove(const char * sz)
Removes the first item matching this value. An assert failure is provoked by an attempt to remove an element which does not exist in debug build.

the project im opening is the C::B

when i click the ok button
it causes and error

i replaced the .Remove with
Code
    int c = buildTargets.GetCount();
    for(int i = 0;i < c;i++)
    {
        wxMessageBox(_T("Target: ") + targetName + _T("\nCurrent Compare Item: ") + buildTargets.Item(i));
        if(buildTargets.Item(i) == targetName)
        {
            buildTargets.RemoveAt(i);
            break;
        }
    }

in the message box the targetName was always tinyXML which does not exist in the list for some reason.

when you look at Current Compare Item:
it has alot of dumpicates like sdk and a few others that repeat in the list a lot and I mean A LOT!!!

but from what i can tell i thought this was supposed to be removing build targets like Window, Unix, Mac
well at least i think so.

either that or one of the svn corrupted the project files and thats why i have alot of sdk lol.. not sure