Page 1 of 1

Please help me with this

Posted: Tue Mar 10, 2009 12:43 pm
by RANEESH
I have this simple query..

Code: Select all

class MyGridCellCustomEditor : public wxGridCellTextEditor
{ 
public:
	bool IsAcceptedKey(wxKeyEvent& event) ;
};

bool MyGridCellCustomEditor ::IsAcceptedKey(wxKeyEvent& event) 
{
	if ( wxGridCellTextEditor::IsAcceptedKey( event ))
	{
		int i_point = Text()->GetInsertionPoint();
		if ( i_point == 2 || i_point == 4 )
		{
			// Some Code
		}
		return true;
	}
	return false;
}

MyGridCellCustomEditor *edit = new MyGridCellCustomEditor();

Getting error when this line executes..

Code: Select all

int i_point = Text()->GetInsertionPoint();
?

Posted: Tue Mar 10, 2009 1:07 pm
by lester
Seems Text() == NULL, so maybe when wxWidgets call IsAcceptedKey( analog of StartingKey in 2.8.9? ) - here none created widget yet

Posted: Tue Mar 10, 2009 1:42 pm
by vdell
OT: Please use more descriptive subjects in the future. Thanks!