News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Current SVN-HEAD reminds again and again about file association

Started by MortenMacFly, December 08, 2005, 09:56:42 PM

Previous topic - Next topic

MortenMacFly

Dear all,

I am having troubles with the current SVN-HEAD:
Everytime I open Code::Blocks I get the message: "Code::Blocks is not currently the default application for C/C++ source files. Do you want to set it as default?". I click "Yes" (also the setting is enabled in the environment config) but the question is raised everytime again when I close/open Code::Blocks. I also tried "Set now" in the environment settings but that does not help.

Furthermore any additional file type associations I typed in manually are lost after re-openening C::B. Any hints?

Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

mandrav

Be patient!
This bug will be fixed soon...

MortenMacFly

Quote from: mandrav on December 08, 2005, 10:24:31 PM
Then why don't you turn it off until it's fixed?
I didn't know it's a bug because searching the registry I found all entries are correctly in place. So I thought it's an issue on my machine...

I've turned it off by now. Thanks.

Morten.

Edit: I've just found http://forums.next.codeblocks.org/index.php?topic=1569. Sorry, I didn't see it's already reported.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

MortenMacFly

By the way... debuggging through the code it seems to be:

if (strVal != _T("\"") + exe + _T("\" ") + batchbuildargs + _T(" --build \"%1\""))

in the DoCheckAssociation() method in "associations.cpp" that causes the error if this is of any help.

Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

killerbot

Morten,

I hope you are so right and that's the cause, so Yiannis, please please, can fix it.
This thing had me going crazy yesterday  :twisted:

MortenMacFly

Additional info: The comparision fails on my machine because strVal is:

"D:\Devel\CodeBlocks_Devel\codeblocks.exe" -na -nd -ns --batch-build-notify --build "%1"

instead of the comparision:

"D:\Devel\CodeBlocks_Devel\codeblocks.exe" /na /nd /ns --build "%1"


Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

thomas

I think the error was in line 158.

Update and try now, please (for me, it strangely works either way...?).

EDIT:
Oh stupid me, it worked either way because I hadn't turned on "check associations", lol....

But yes, that fixed it. :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

MortenMacFly

Quote from: thomas on December 09, 2005, 12:05:52 AM
Update and try now, please [...]
This works. If I am getting the date/time of yout post right then I hope you've had some sleep tonight... :roll:

One issue still remains: The additional file type associations are lost upon restart of C::B. I am using this to add a new file type "Fortan sources" with the extensions "*.f;*.f77;*.inc;*.cmn" if you want to try out yourself.

Thanks a lot for all your effort.

Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

tiwag

Quote from: thomas on December 09, 2005, 12:05:52 AM
... it worked either way because I hadn't turned on "check associations", lol....
...
classic  :D