Please help me with this

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
RANEESH
In need of some credit
In need of some credit
Posts: 7
Joined: Thu Mar 05, 2009 11:37 am

Please help me with this

Post by RANEESH » Tue Mar 10, 2009 12:43 pm

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();
?
wxWidgets 2.4.2 / Windows XP / Borland 5.5

.

lester
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 211
Joined: Sat Sep 02, 2006 7:24 pm
Location: Ukraine

Post by lester » Tue Mar 10, 2009 1:07 pm

Seems Text() == NULL, so maybe when wxWidgets call IsAcceptedKey( analog of StartingKey in 2.8.9? ) - here none created widget yet

vdell
Moderator
Moderator
Posts: 536
Joined: Fri Jan 07, 2005 3:44 pm
Location: Finland
Contact:

Post by vdell » Tue Mar 10, 2009 1:42 pm

OT: Please use more descriptive subjects in the future. Thanks!
Visual C++ 9.0 / Windows XP Pro SP3 / wxWidgets 2.9.0 (SVN) | Colligere

Post Reply