Re: Mistake in wxEuphoria version 16

new topic     » goto parent     » topic index » view thread      » older message » newer message
Vinoba said...

The remaining question is "Why does "set_col_label" NOT work, while the "set_row_label" works in the original demo.

If you think that my change in Matt's code was OK, it might be incorporated in the next version.

Thanks for finding this issue. The problem is with the code in wxeud.e that call the C functions. Originally, there were only two parameters. However, in r469, I see that I added the "add_to_selected" parameters in the C++ code. Here is what the function prototypes look like now:

void WXEUAPI select_grid_row( intptr_t grid, int row, int add_to_selected ) 
 
void WXEUAPI select_grid_col( intptr_t grid, int col, int add_to_selected ) 

The euphoria wrappers inside of wxeud.e are automatically generated based on the C++ files. So it will pick up on new functions, and automatically add wrappers in there. After the C++ functions were changed, I forgot to update the euphoria wrapper. The define_c_func calls are regenerated each time. However, if there is already a euphoria routine for a particular function, it's left alone.

In this case, there were already wrappers, so the automatic update didn't change the functions, and neither did I. I've updated the code and committed it to svn. If you want to patch your file locally, here's what the functions should look like:

--/topic wxGrid 
--/proc select_grid_row( atom grid, integer row, integer add_to_selected ) 
-- 
--Selects the specified row. 
public procedure select_grid_row( atom grid, integer row, integer add_to_selected ) 
    c_proc( WX_SELECT_GRID_ROW, {grid, row, add_to_selected} ) 
end procedure 
 
--/topic wxGrid 
--/proc select_grid_col( atom grid, integer col, integer add_to_selected ) 
-- 
--Selects the specified column. 
public procedure select_grid_col( atom grid, integer col, integer add_to_selected ) 
    c_proc( WX_SELECT_GRID_COL, {grid, col, add_to_selected}) 
end procedure 

I've bumped the version to v0.16.1 in svn. If I don't get any other reports in the next few days, I'll probably release that as-is.

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu