What Mac specific bugs are there to SketchUp (that I as a developer may need to know)?

I only have PC myself to test my plugins on. Yesterday I learned SketchUp for Mac doesn’t call validation procs when needed for commands (doesn’t update the checked or disabled state of toolbar buttons) (Command validation proc not called on OS X). I already know of many of the Web Dialog issues from ThomThom’s manual (https://github.com/thomthom/sketchup-webdialogs-the-lost-manual/wiki).

What other Mac issues do I need to know of as a developer? Has anyone made a list of these?

1 Like

I can add one small but very irritating one in a Ruby InputBox - the display text will normally be truncated, unless you add lots of trailing spaces to some if not all of the elements.

And the input text fields don’t seem to stretch with the contents. If I can find it, there’s a thread about it from a year or two back - yes, here it is.

1 Like

This is exactly the kind of platform differences I’m looking for :+1: .

there have been bits and pieces on SCF and the old Google Forum, but I don’t know of a singular repository of differences between mac and PC versions…

heres a few thoughts in no particular order…

the main differences are due to the multi document interface…

in a ‘normal’ mac app, the OS looks after updating the state of the ‘single’ Custom Toolbar and Menu when you change documents…

in SU additional ‘floating’ utility panels are used for Toolbars which primarily duplicate Custom Toolbar items, and are linked in to the OS control mechanism…

the native non ruby toolbars buttons can be “Momentary Push”, “Momentary Change”, “Push On/Push Off” or “Toggle” and mostly react to document change…

ruby toolbars buttons are “Push On/Push Off” and do not change until re-clicked even if you change documents…

if you have a Tool Button in both the Custom Toolbar and a Floating Toolbar you can see conflicting states and loose Tooltips on one or both…

states

there is only a single instance of Ruby interrupter for all open documents i.e. models…

unless states, observers. procs and vars are written to be model specific, then they they will be global…

john

I don’t have a list of bugs, as much as behavior:

  1. Back slashes and forward slashes:
    a) My “require” statements are coded with single ticks, and I sometimes I intermix forward and back slashes. Windows Sketchup tolerates proper back slashes (the Ruby standard is forward slash for paths). Back slashes work as long as they are escaped correctly (which single tick marks does). This allows the open dialog box to return paths with back slashes. When I move my scripts over to Mac, it will raise an exception.
    b) I write and read the path from the open dialog box to global settings with “Sketchup.write_default” and “Sketchup.read_default”. On Windows, you need to replace back slashes with forward slashes when writing because the read will create escape character sequences with back slashes. That isn’t needed on a Mac.

  2. I have a few tools that use my own cursor icons, and I enable the cursor in the “onSetCursor” callback. I have found that the cursor icon does not change over to the user provided one on a Mac until a mouse click occurs. I have put the cursor enabling in other methods beside that one, but it doesn’t completely solve the problem. This issue is not consistent, but it may be due to my cursors not conforming to what Mac expects.

  3. I have not had UI.create_cursor hotspot coordinates working on the Mac (this recently happened on later versions of Windows Sketchup). I continue to use a simple PNG file instead of moving over to the vector graphics for Windows and PDF file for Mac. Windows Sketchup allowed PNG files that were not square, and squares that were not a power of 2. I now limit to 64x64 on Windows, and 32x32 on Mac. I have had to alter cursor images so that the pointing spot for the hotpoint was at coordinates 0,0. (Note: I’m referring to mouse cursor images, not toolbar button ones).

  4. For Ruby C extensions, Windows Sketchup uses a “*.so” shared object file, while Mac takes a “.bundle” file. That isn’t something a developer is likely to forget because they need to be compiled with different IDEs on different operating systems.

1 Like

I use File.join( path, file ) and do not have any difficulties going between Mac and Windows.
I use single quotes for most strings since they are slightly faster than double quotes.

I use double quotes when escaping or concatenating strings such as
str = "#{var1}, #{var2}"
Again they work the same in Mac and Windows.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.