User forums > Using Code::Blocks

Open file in an existing instance of Code Blocks

(1/2) > >>

apostrophe:
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

dmoore:
well in theory "settings->environment->allow only one running" instance should take care of that.

apostrophe:

--- Quote ---well in theory "settings->environment->allow only one running" instance should take care of that.
--- End quote ---

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

dmoore:
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:
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.

Navigation

[0] Message Index

[#] Next page

Go to full version