For some tools that I’ve written, I’m loading a specific cursor icon. Everything always runs fine on Windows but some of the tools icons doesn’t load on MacOSX, I just get the bascic arrow icon without any ruby console error message…
Here is the code I’m running in the activate method of the tools:.
def activate # Grab tool cursor icon file tool_cursor_file = File.dirname(__FILE__) + "/images/cursor_drawing.png" # Create the cursor if it doesn't exists yet if @@cursor_id.nil? @@cursor_id = UI.create_cursor(tool_cursor_file, 4, 27) end end
What is really strange is that for the same code on two different tools it works for one and doesn’t for another.
So I’ve started the check the icon file but I can’t find differences, both are 24x24px, are RGB 8bits png files BUT when, for a tool that doesn’t load the icon, I’m switching the images it works. That means the problem is linked to the image use.
So MacOSX seems to be more sensitive than Windows to the file encoding type. Does anyone knows what are the recommanded cursor image settings ?
Is there something else that I’m missing ?
Thanks for your help.