Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Development => Topic started by: MortenMacFly on December 08, 2005, 09:56:42 pm

Title: Current SVN-HEAD reminds again and again about file association
Post by: MortenMacFly on December 08, 2005, 09:56:42 pm
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.
Title: Re: Current SVN-HEAD reminds again and again about file association
Post by: mandrav on December 08, 2005, 10:24:31 pm
Then why don't you turn it off until it's fixed?
Title: Re: Current SVN-HEAD reminds again and again about file association
Post by: MortenMacFly on December 08, 2005, 10:46:45 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.codeblocks.org/index.php?topic=1569. Sorry, I didn't see it's already reported.
Title: Re: Current SVN-HEAD reminds again and again about file association
Post by: MortenMacFly on December 08, 2005, 11:00:43 pm
By the way... debuggging through the code it seems to be:
Code
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.
Title: Re: Current SVN-HEAD reminds again and again about file association
Post by: killerbot on December 08, 2005, 11:07:15 pm
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:
Title: Re: Current SVN-HEAD reminds again and again about file association
Post by: MortenMacFly on December 08, 2005, 11:08:53 pm
Additional info: The comparision fails on my machine because strVal is:
Code
"D:\Devel\CodeBlocks_Devel\codeblocks.exe" -na -nd -ns --batch-build-notify --build "%1"
instead of the comparision:
Code
"D:\Devel\CodeBlocks_Devel\codeblocks.exe" /na /nd /ns --build "%1"

Morten.
Title: Re: Current SVN-HEAD reminds again and again about file association
Post by: thomas on December 09, 2005, 12:05:52 am
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. :)
Title: Re: Current SVN-HEAD reminds again and again about file association
Post by: MortenMacFly on December 09, 2005, 08:35:06 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.
Title: Re: Current SVN-HEAD reminds again and again about file association
Post by: tiwag on December 09, 2005, 08:44:26 am
... it worked either way because I hadn't turned on "check associations", lol....
...
classic  :D