sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Request] Testing on a Mac

    Scheduled Pinned Locked Moved Plugins
    27 Posts 7 Posters 7.3k Views 7 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • chrisglasierC Offline
      chrisglasier
      last edited by

      @unknownuser said:

      You may just be facing a well-known synchronization issue with web dialogs on Mac. Unlike in Windows/IE, the windows.location callback verb called from HTML does NOT block, so that you continue execute JavaScript. Furthermore, most callbacks will be 'lost', as Sketchup uses only one buffer to communicate with Ruby, not a queue.

      Thanks for replying Fredo. I am afraid I am quite new to Ruby, generally just using the callbacks to instruct SU to do things - "move component[x]" type of thing. I expected some hassle with Mac/PC compatibility but from the post you quoted it seems it is way beyond my ken, and the problems getting access to a Mac are fraught with frustration (as I predicted). I don't even know if the current version doesn't work but I suspect it won't.

      @unknownuser said:

      You have to do the synchronization manually, which, I agree, is not a piece of cake.

      Does this mean I have to make chains of javascript/ruby functions, viz

      JS01 call ruby01; ruby01 call JS 02; JS02 call ruby 02 ... until the play is complete.

      I have done something like this before with setInterval functions that control a number of different objects with different timing and paths, so if I have interpreted what you say correctly, I feel I would be still in with a chance (British stoicism and all that).

      But there is still the problem, common on the forum I now know, of finding Mac owners willing to test. If anyone reading this will volunteer, I promise a mention in dispatches. Here, opportunistically, is the current "best chance" set of files.

      Includes start option for Mac

      Incidentally, Fredo, I did try to press for resolution of this well-known synchronization issue again in this reply to CMD - over optimistically perhaps.

      My thanks and regards

      Chris

      With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

      1 Reply Last reply Reply Quote 0
      • chrisglasierC Offline
        chrisglasier
        last edited by

        @thomthom said:

        If this Mac testing isn't too urgent I could have a look at it. But I don't have much spare time as I'm working on an architectural project besides work which is due on ~2 weeks. +pluss my involvement in other projects and various beta testings.
        But I do have a Mac Mini at home that I've used to debug ruby plugins.

        That's kind of you to offer. Considering the obstacles bought up here and in the SFX Bridge topic, I think time becomes subservient to finding some solution (even if temporary). Perhaps it could be lodged in the repository for the benefit of anyone else attempting such similar lunacy with web dialogs and Macs.

        Two sets of files are attached. Any original files and directories should be deleted. For the Mac version, I have:

        ... introduced a START control to deal with the fact there is no Sketchup.active_model when the Ruby scripts are first loaded. This is not a tool or a menu item but I think the effect should be the same.

        ... rewritten the code so that no window.location call is followed by any javascript statements.

        ... opened the MAC files in FF and Safari to see if either reported syntax errors.

        Opportunistically, I included the PC version which includes the makings of a javascript call - initiated by user action in SU's display and selection observer - as described here. A solution to this too might be a good addition to the SFX web dialog section.

        Whilst there is hope I am very willing to rejig things, provided I have guidance, so please let me know what you think.

        Double tak*

        Chris

        • Norwegian for thank you if I remember correctly from my time working with Snohetta

        cgScenes R1.034(MAC).zip


        cgScenes R1.035(PC).zip

        With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

        1 Reply Last reply Reply Quote 0
        • thomthomT Offline
          thomthom
          last edited by

          Close! 😄
          Tak = Roof
          Takk = Thanks

          OT (sorry but you got me curious) what work did you do with Snøhetta?

          Thomas Thomassen — SketchUp Monkey & Coding addict
          List of my plugins and link to the CookieWare fund

          1 Reply Last reply Reply Quote 0
          • chrisglasierC Offline
            chrisglasier
            last edited by

            @thomthom said:

            Close! 😄
            Tak = Roof
            Takk = Thanks

            OT (sorry but you got me curious) what work did you do with Snøhetta?

            Alexandria Library (design time schedule and monitoring); also co-authored Atomic Architecture with Craig Dykers, one of the founders ... a long time ago!

            Chris

            Edit added AA link - now Google is working

            With TBA interfaces we can analyse what is to be achieved so that IT can help with automation to achieve it.

            1 Reply Last reply Reply Quote 0
            • TIGT Offline
              TIG Moderator
              last edited by

              Can some one with a Mac tell me what they get returned when they use this snippet in the Ruby Console...

              ENV["TEMP"]
              

              Is it 'nil' or a 'path_to_the_temp_folder' ?
              Also with

              ENV["TMP"]
              

              ditto ...
              Also a Mac whole ENV listing, got thus...

              ENV.sort
              

              would be helpful.

              TIG

              1 Reply Last reply Reply Quote 0
              • tbdT Offline
                tbd
                last edited by

                ENV["TEMP"]
                => nil
                
                
                ENV["TMP"]
                =>nil
                
                
                ENV.sort
                => [["COMMAND_MODE", "legacy"], ["DISPLAY", "/tmp/launch-jGxAIU/;0"], ["HOME", "/Users/TBD"], ["LOGNAME", "TBD"], ["PATH", "/usr/bin;/bin;/usr/sbin;/sbin"], ["PYTHONPATH", "/Applications/Quick Search Box.app/Contents/Frameworks/Vermilion.framework/Resources"], ["SHELL", "/bin/bash"], ["SSH_AUTH_SOCK", "/tmp/launch-4hMGhW/Listeners"], ["TMPDIR", "/var/folders/oo/oofmaDN7HfGByvhOdkcyck+++TI/-Tmp-/"], ["USER", "TBD"], ["__CF_USER_TEXT_ENCODING", "0x1F5;0;0"]]
                
                

                SketchUp Ruby Consultant | Podium 1.x developer
                http://plugins.ro

                1 Reply Last reply Reply Quote 0
                • TIGT Offline
                  TIG Moderator
                  last edited by

                  Thanks TBD, so your temp folder is called "TMPDIR" 😄

                  TIG

                  1 Reply Last reply Reply Quote 0
                  • 1
                  • 2
                  • 2 / 2
                  • First post
                    Last post
                  Buy SketchPlus
                  Buy SUbD
                  Buy WrapR
                  Buy eBook
                  Buy Modelur
                  Buy Vertex Tools
                  Buy SketchCuisine
                  Buy FormFonts

                  Advertisement