I can work around this, so I don't need a fix but I think the 
QueryModel::fieldName() method has an off by one index error.

The following code returns the header name for column 1 when fetching 
fieldName(0), header for column 2 when fetching (fieldName(1), etc.

        // Output headers 
        int colCount = pOpHistoryModel->columnCount();                          
                                                                 
        for (int col = 0; col < colCount; col++) 
        {
            response.out() << pOpHistoryModel->fieldName(col);
            
            // Another element?  Add a comma 
            if (col+1 < colCount)
            {
                response.out() << ",";
            }
            // Last item add a newline
            else
            {
                response.out() << endl;
            }
        }

Craig

Craig Miller
http://spatialminds.com




------------------------------------------------------------------------------
Got visibility?
Most devs has no idea what their production app looks like.
Find out how fast your code is with AppDynamics Lite.
http://ad.doubleclick.net/clk;262219671;13503038;y?
http://info.appdynamics.com/FreeJavaPerformanceDownload.html
_______________________________________________
witty-interest mailing list
witty-interest@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/witty-interest

Reply via email to