Author Topic: Open file in an existing instance of Code Blocks  (Read 5517 times)

apostrophe

  • Guest
Open file in an existing instance of Code Blocks
« on: June 04, 2007, 06:25:54 pm »
I’d like for Code Blocks to open an associated file in an existing instance, instead of in a new instance. Is this possible?

For example:

I have a project open in Code Blocks, and when I double-click a file in Explorer, I’d like it to open in the same instance that the project is in. Currently, it opens in a new instance of Code Blocks.

John

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Open file in an existing instance of Code Blocks
« Reply #1 on: June 04, 2007, 08:56:47 pm »
well in theory "settings->environment->allow only one running" instance should take care of that.

apostrophe

  • Guest
Re: Open file in an existing instance of Code Blocks
« Reply #2 on: June 04, 2007, 09:08:04 pm »
Quote
well in theory "settings->environment->allow only one running" instance should take care of that.

Tried that. That gives me an error - "Another program instance is already running, aborting" when I try to open another file.

Offline dmoore

  • Developer
  • Lives here!
  • *****
  • Posts: 1576
Re: Open file in an existing instance of Code Blocks
« Reply #3 on: June 04, 2007, 09:48:32 pm »
actually, I don't have this problem even with that option unchecked. sorry to lead you down the wrong path...

I assume you are running windows?

two things to check:
1. do you have more than one version of cb installed? if yes, only one can be set as the default file association for a given file type. thus double clicking may be spawning the unopened instance if the unopened instance has the associations. (if you double click on a second file, it should not spawn a third instance of cb, but open in the second)
2. you may need to set the file associations: "settings->environment->check and set file associations..."

try that and report back...

apostrophe

  • Guest
Re: Open file in an existing instance of Code Blocks
« Reply #4 on: June 05, 2007, 03:10:49 pm »
It's working correctly now. I'm running Windows 98. I uninstalled Code Blocks, deleted the Program Files\Code Blocks folder, then reinstalled and all is well now.

Thanks for the help.


Offline Electron

  • Single posting newcomer
  • *
  • Posts: 7
    • Crucible of Stars
Re: Open file in an existing instance of Code Blocks
« Reply #5 on: July 02, 2007, 03:51:28 pm »
I have the reverse problem. Double clicking a project file always opens in the existing instance. I am able to start a new instance only by launching the codeblocks executable. Any ideas?
You do a lot of programming? Really? I try to get some in, but the debugging keeps me pretty busy.