Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

Two problems with r8232

<< < (2/5) > >>

oBFusCATed:
Alpha: Probably you have to look what is happening in the load function, not in the save function.

Alpha:
I guess I was not quite clear.
Line 652

--- Code: ---        for (unsigned int i = 0; i < it->second.m_Colours.GetCount(); ++i)
        {
            OptionColour* opt = it->second.m_Colours.Item(i);
            if (!opt)
                continue;
            wxString tmpKey;
            tmpKey << key << _T("/style") << wxString::Format(_T("%d"), i); // <-- remap required here

            if (cfg->Exists(tmpKey + _T("/name")))
                opt->name = cfg->Read(tmpKey + _T("/name"));
            else
            {
                // make sure we didn't create it accidentally
                cfg->DeleteSubPath(tmpKey);
                continue;
            }

            if (cfg->Exists(tmpKey + _T("/fore")))
                opt->fore = cfg->ReadColour(tmpKey + _T("/fore"), opt->fore);
            if (cfg->Exists(tmpKey + _T("/back")))
                opt->back = cfg->ReadColour(tmpKey + _T("/back"), opt->back);
            if (cfg->Exists(tmpKey + _T("/bold")))
                opt->bold = cfg->ReadBool(tmpKey + _T("/bold"), opt->bold);
            if (cfg->Exists(tmpKey + _T("/italics")))
                opt->italics = cfg->ReadBool(tmpKey + _T("/italics"), opt->italics);
            if (cfg->Exists(tmpKey + _T("/underlined")))
                opt->underlined = cfg->ReadBool(tmpKey + _T("/underlined"), opt->underlined);

            if (cfg->Exists(tmpKey + _T("/isStyle")))
                opt->isStyle = cfg->ReadBool(tmpKey + _T("/isStyle"), opt->isStyle);
        }

--- End code ---
The only way this loading function could be adapted (because OptionColour's are saved numerically) is if it had manually created remap database, and even then, it would only work if it knew which versions it was mapping from->to.  Does Code::Blocks have a method by which it can retrieve the previous version number default.conf was saved with?

oBFusCATed:
So, I guess, the changes to the lexer have to be reverted, as I predict massive amount of unhappy users attacking the forum.

btw: What do I need to do in order to fix my syntax highlight?

p.s. probably the new styles should be save in newer, better way, but the old should be kept as they are.

MortenMacFly:

--- Quote from: oBFusCATed on August 14, 2012, 10:54:29 pm ---btw: What do I need to do in order to fix my syntax highlight?

--- End quote ---
I still don't get what the problem is here really., I don't have such issue - it works just fine. What modifications are we talking about? There is no new functionality in the editor's "Syntax highlight" options...?!

oBFusCATed:

--- Quote from: MortenMacFly on August 15, 2012, 06:45:55 am ---I still don't get what the problem is here really., I don't have such issue - it works just fine. What modifications are we talking about? There is no new functionality in the editor's "Syntax highlight" options...?!

--- End quote ---
The problem is that between 8164 and 8232 something changed and now some strings are gray instead of black as they were before the upgrade.
I have no time to bisect it to find the wrong revision, unfortunately.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version