I'm trying to get a Mac conversion of a QT-based C++ project of mine working. Despite being very much a Mac novice I've solved most issues, but am stuck with a problem relating to multiple application instances.
My application is designed as a single-document system - every time someone double-clicks a file associated with it, I need a new instance of the application to start. Currently the Mac version of my program starts, waits for the system 'open file' message to appear, then opens that file - works fine the first time, but not of course for opening multiple files.
Ideally I'd like to either
a) Tell the OS that it should automatically start a new instance of my application - if there is any way to do that - or
b) Have my application intercept new 'file open' messages and start a new instance of itself to handle it - again, if this is possible.
Can anyone advise on how to do this? Obviously plan B is to recode the whole thing to work on a single application with multiple windows paradigm, but there are a whole host of practical reasons why I'd much rather not do this!
Thanks in advance
Mark
My application is designed as a single-document system - every time someone double-clicks a file associated with it, I need a new instance of the application to start. Currently the Mac version of my program starts, waits for the system 'open file' message to appear, then opens that file - works fine the first time, but not of course for opening multiple files.
Ideally I'd like to either
a) Tell the OS that it should automatically start a new instance of my application - if there is any way to do that - or
b) Have my application intercept new 'file open' messages and start a new instance of itself to handle it - again, if this is possible.
Can anyone advise on how to do this? Obviously plan B is to recode the whole thing to work on a single application with multiple windows paradigm, but there are a whole host of practical reasons why I'd much rather not do this!
Thanks in advance
Mark