int MyFrame::callback(void *NotUsed, int argc, char **argv, char **azColName){
int k;
rows=argc;
for(k=0;k<argc;k++)
{
if(argv[k])
{
buffer[k][counter]=strdup(argv[k]);
gridColumnNames[k]=strdup(azColName[k]);
}
}
counter++;
return 0;
}
class MyFrame : public wxFrame
{
public:
MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size,
long style = wxDEFAULT_DIALOG_STYLE | wxMAXIMIZE_BOX | wxMINIMIZE_BOX);
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
void OnLoad();
void OnSave();
void OnSaveAs();
void ForeColChange();
void BackColChange();
void PurgeColours(wxColour col,int type);
void SetDefColours();
void TextColChange();
static int callback(void *NotUsed, int argc, char **argv, char **azColName);
wxString buffer[100][220]; wxString gridColumnNames[40]; int counter; int rows;
sqlite3 *db; char *zErrMsg; Calendar *calendar; wxString fileName; DrillManager *drillmanager; wxColour defFore; wxColour defBack; wxColour defText; private: DECLARE_EVENT_TABLE() };
27 D:\DOCUME~1\AleksP\Desktop\PROJEK~1\win32\myframe.cpp invalid use of member `MyFrame::rows' in static member function
I get this error for all the variables used in the callback. Used when the variables are global and the callback outside the class it works fine. What is wrong?
Please ask questions if something is unclear I need to get this sorted out!
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/