What if the WxPerl class does not have any method?

I am programming an application that uses WxPerl, but the Wx :: Grid class does not have a UseNativeColHeader method. What can I do to call this method?

What about the event? The EVT_GRID_COL_SORT event is not implemented in WxPerl. Is there a way around a limitation in pure Perl?

+5
source share
1 answer

If you know the expected arguments for the missing method, you can set your own method with this name and enter it in the BEGIN block, after which it will be available to the corresponding module.

For this to work, you will need to make sure that you first load this module (in the BEGIN block), and then define (empty if you don't know what should be there) the routine, making sure that it returns the correct one so that Wx :: Grid will not fail on you.

If possible, you can simply find the source somewhere and put it in a BEGIN block, unless you just want to get by without it. However, if you are after the actual "identical" behavior, you can change your mind a bit to reinvent the wheel.

I could develop a little more if I had more information about what you really need (you need to call these methods and generate these events, you can update the modules where you are, etc.).

0
source

Source: https://habr.com/ru/post/1209704/


All Articles