Angus Leeming wrote:
Where does 'gstring' come from? There ain't no typedef to std::string.

I took the code from somewhere else and tried to make it self-contained, although I obviously didn't succeed.

AcrobatReader::AcrobatReader( gstring const & an ) :

Just change to std::string, and you are fine.

I note that
    'bool firstTime;'
sin't actually used (or even initialised).

Get rid of it - I took something else out, but missed this.

You use 'retCode' in the constructor to flag whether acroread was found, etc but if not you don't disable the class or throw an exception. Why not? Do I miss something?

Hm, maybe I took out too much. It is left as an exercise to fill in the missing bits.

Moving on, this class is used to control a single 'acrobatReaderExecutable' running a single 'file', right? One way to extend it would be to store a vector<string> files, rather than a single file, no?

Yes and yes. You can reuse the DDE connection for several files.

Finally, and most importantly, how do you envisage this class being used?

I would put this code directly in the LyX executable, when compiling for Windows.

Regards,
Asger

Reply via email to