Author Topic: Current SVN-HEAD reminds again and again about file association  (Read 5987 times)

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Current SVN-HEAD reminds again and again about file association
« 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline mandrav

  • Project Leader
  • Administrator
  • Lives here!
  • *****
  • Posts: 4315
    • Code::Blocks IDE
Re: Current SVN-HEAD reminds again and again about file association
« Reply #1 on: December 08, 2005, 10:24:31 pm »
Then why don't you turn it off until it's fixed?
Be patient!
This bug will be fixed soon...

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Current SVN-HEAD reminds again and again about file association
« Reply #2 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.
« Last Edit: December 08, 2005, 10:51:59 pm by MortenMacFly »
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Current SVN-HEAD reminds again and again about file association
« Reply #3 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline killerbot

  • Administrator
  • Lives here!
  • *****
  • Posts: 5494
Re: Current SVN-HEAD reminds again and again about file association
« Reply #4 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:

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Current SVN-HEAD reminds again and again about file association
« Reply #5 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Current SVN-HEAD reminds again and again about file association
« Reply #6 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. :)
« Last Edit: December 09, 2005, 12:09:20 am by thomas »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Current SVN-HEAD reminds again and again about file association
« Reply #7 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline tiwag

  • Developer
  • Lives here!
  • *****
  • Posts: 1196
  • sailing away ...
    • tiwag.cb
Re: Current SVN-HEAD reminds again and again about file association
« Reply #8 on: December 09, 2005, 08:44:26 am »
... it worked either way because I hadn't turned on "check associations", lol....
...
classic  :D