From: Mark W. <ma...@ne...> - 2005-03-30 19:35:30
|
Hi Mattia, I have now revisited this and tested more thoroughly, the last time I worked on this I was experiencing problems with the firing of the events so I never got to test what the method actually returned. Now I am not looking at the events at all but Wx::Grid::GetSelectedCells does not seem to be returning the array as expected. GetSelectedRows and GetSelectedCols work as expected but this returns nothing. Any assistance would be appreciated. I will add some code to the sample tomorrow to demonstrate the selection of rows, cols and cells to highlight the problem. Thanks Mark -----Original Message----- From: wxp...@li... [mailto:wxp...@li...] On Behalf Of Mattia Barbon Sent: 23 November 2004 11:42 PM To: Mark Wardell Cc: 'wxPerl users ML' Subject: Re[2]: [wxperl-users] Wx::Grid missing GetSelectedCells On Thu, 18 Nov 2004 12:51:17 +0200 Mark Wardell <ma...@om...> wrote: Hello, sorry for the delay in getting back to you! > I have spent quite a bit of time on this but being my first major > attempt at this, I confess it is quite a struggle. What I managed so > far is below, it compiles but throws an exception at runtime. I am > sure there are several problems. > > void > wxGrid::GetSelectedCells() > PPCODE: > int i; > int n; > wxGridCellCoordsArray coordsArray = THIS->GetSelectedCells(); > n = (int) sizeof(wxGridCellCoordsArray) / (int) > sizeof(wxGridCellCoords); > > for( i = 0; i < n; ++i ) > { > PUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), > new wxGridCellCoords( coordsArray[i] ), > "Wx::GridCellCoords" ) ); > } void wxGrid::GetSelectedCells() PPCODE: wxGridCellCoordsArray selection = THIS->GetSelectedCells(); EXTEND( SP, (IV) selection.GetCount() ); for( size_t i = 0; i < selection.GetCount(); ++i ) PUSHs( wxPli_non_object_2_sv( aTHX_ sv_newmortal(), new wxGridCellCoords( selection[i] ), "Wx::GridCellCoords" ) ); I must admit that it was more difficult than I initially thought of. Regards Mattia ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ wxperl-users mailing list wxp...@li... https://lists.sourceforge.net/lists/listinfo/wxperl-users |