Tooltip not working on mac catalina 10.15

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
venkateshg
In need of some credit
In need of some credit
Posts: 3
Joined: Wed May 19, 2021 4:04 am

Tooltip not working on mac catalina 10.15

Post by venkateshg »

I have installed KiCad Mac OSDN version : kicad-unified-5.1.9-0-10_14.dmg on my MacOS catalina 10.15.Iam facing issue with the tooltips which used to work perfectly with windows version.The info associated with the tooltip is not showing on mac version. From documentation,i could see that bitmap function supports PICT resources for mac.So,i have converted png images to PICT type and edited as below.

tip_path is the path of images of both png and PICT

SetBitmap(wx.Bitmap( tip_path, wx.BITMAP_TYPE_PNG | wx.BITMAP_TYPE_PICT))
SetToolTip(wx.ToolTip(“info to show”))

After making the changes,i have encountered with error “no bitmap handler for type 31 defined” and “no image handler for type 31 defined”

Any help for solving the above issue
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: Tooltip not working on mac catalina 10.15

Post by PB »

venkateshg wrote: Wed May 19, 2021 6:40 am After making the changes,i have encountered with error “no bitmap handler for type 31 defined” and “no image handler for type 31 defined”
I am not familiar with either MacOS or Python nor do I see a connection between wxBitmap and wxToolTip.

Still, ORing the bitmap type enum seems pretty odd to me, that is not something one would do on Windows.

Did you try using just wxBITMAP_TYPE_PICT or wxBITMAP_TYPE_PICT_RESOURCE (I have no idea what comprises a resource on MacOS).

I also do not understand why would you replace the platform-independent PNG files which should work everywhere with PICTs?
venkateshg
In need of some credit
In need of some credit
Posts: 3
Joined: Wed May 19, 2021 4:04 am

Re: Tooltip not working on mac catalina 10.15

Post by venkateshg »

I have tried initially with only png files on mac version..but there is no information being showed when cursor placed on the image
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: Tooltip not working on mac catalina 10.15

Post by PB »

I have also never used KiCad so TBH, I have no idea what are you talking about, including, as I already wrote, the assumed relationship between wxBitmap and wxToolTip. AFAIK, there is no such relationship?

I also do not understand why the code you show is in what I assume is Python? It seems KiCad is written in C++...

Anyway, as usual: Check if the bitmap was properly loaded or not. If it was not, it normally shows an error message using wxLogError(). If the bitmap is not loaded properly, it should be easy to find out why, e.g. image handler not loaded, invalid path, invalid image...

EDIT
Please make sure you understand the value passed for wxBitmapType: https://docs.wxwidgets.org/trunk/classw ... e0dda39b1b

This value is interpreted differently on different platforms. For example, on Windows the name specifies not file path but the resource name and wxWidgets look for that resource in compiled resources embedded in the executable. I have no idea what it means on MacOS...
Post Reply