Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

File association to registry fails?

<< < (5/7) > >>

MortenMacFly:

--- Quote from: thomas on January 04, 2006, 01:24:42 pm ---This is almost certain to fail one day. [...]

--- End quote ---
True, but it works in a multi-user/multi-OS environment... :wink: But honestly: I agree (as I said). I've added this post because it might be the source for another (better) idea... just collecting ideas and it's pros/cons here...
Morten.

killerbot:

--- Quote ---The problem with multiple instances is that we need a bulletproof way to hand the commandline from a new instance to the already running instance. Unluckily, this is not precisely trivial to implement cross-platform.
--- End quote ---
When I start firefox with the option -url "my.html" or firefox -url "www.codeblocks.org" it also hands it over to the already running instance. But maybe there's different code for that according to the operating  system. So not portable then. (maybe for us : ifdef wxWIN, have seen it in other cb sources also).


--- Quote ---except for the occasional "cannot find file" error.
--- End quote ---
Thomas, you're lucky, at my system it is NOT occasional, it's always. :-(
Really, maybe not top priority, but suppose you use an editor program and when you click on every .txt file, you get error messages ... you wouldn't like it.
Therefor , all ideas and knowledge that might help bring it on, I'll try to study it or help others.


[EDIT] : Registry code --> platform dependent, but apparantly DDE : platform independent ??

Urxae:
Hmm... This might be a bit obvious, but if Firefox manages to get this to work, and is both cross-platform (or at least has implementations for lots of platforms) and Open Source...

Unfortunately, I don't have time to go digging through its sources right now. If anyone has any time left to fill, though...

rickg22:
I have an idea...

make a "Codeblocks_starter.exe" that will search the current processes for codeblocks.exe, and if there's one, try to communicate with it and tell it to open the file.

The problem is the how :P. I think using a TCP port for it (there was a wxTCPserver or something for inter-process communication) would be fine. This way, if there are TWO instances of codeblocks, the starter can ask you which instance you want to open the file with.

killerbot:
M$ devstudio has a special starter app, so I think they do it the way Rick is suggesting.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version