Page 1 of 1

Graphs

Posted: Wed Nov 11, 2009 2:46 pm
by elliswr
So funny thing on the Mac is that when a graph or pie chart is generated, a file is created in the directory containing the application bundle. I noticed this when mmex is opened from the desktop. I hadn't really cared that much about it because it was destroyed when the application was quit. But now that MMEX on the Mac is working as well as the Windows version, I thought I might look into why this was happening as well as maybe add some graphs for trending account balances over time.

Which brings me to this from mmgraphgenerator.cpp

mmGraphGenerator::mmGraphGenerator(const wxString& outFileName)
{
// for systems without the graphs directory this would assert an error!
htmlString_ = /* wxT("graphs\\") + */ outFileName;
}

So I get that putting in the "graphs\\" would generate an error on systems without a graph folder, but why not just make a graphs folder. Or would anyone rather it be:

htmlString_ = mmGetBaseWorkingPath + outFileName;

In either case this would place the generated graphs within the application bundle, where the user would not notice.