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

    Undefined method

    Scheduled Pinned Locked Moved Developers' Forum
    12 Posts 7 Posters 680 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.
    • gillesG Offline
      gilles
      last edited by

      Hello,I get this message on ruby console when running SU 6 (on mac 10.4).
      Thoses plugins seem to work well for pc user, so my questions are:
      -is this a mac issue and I just can cry?
      -is there something to do to fix it and what could it be?
      Thanks.

      @unknownuser said:

      Error Loading File clf_simple_loft_loader.rb
      undefined method select_tool' for nil:NilClass Error Loading File pathface.rb undefined method selection' for nil:NilClass
      Error Loading File sublend.rb
      undefined method `selection' for nil:NilClass

      " c'est curieux chez les marins ce besoin de faire des phrases "

      1 Reply Last reply Reply Quote 0
      • gillesG Offline
        gilles
        last edited by

        hello!?

        " c'est curieux chez les marins ce besoin de faire des phrases "

        1 Reply Last reply Reply Quote 0
        • R Offline
          remus
          last edited by

          Your best bet is to send an email/PM to the authors of the scripts mentioned in the error dialogue.

          If you open the files in question you can usually find the name (and possibly email address) of the author at the top of the file.

          http://remusrendering.wordpress.com/

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

            CLF [Chris Fullmer] needs to respond - he wrote this script... I suspect that something isn't in the correct folder - Macs have different folder paths to PCs...

            The 'clf_simple)loft_loader.rb' which is in the Plugins folder tries to load some other files... In the Plugins folder there should be another folder called 'clf_simple_loft' in that folder there are some .png button images and the main 'clf_simple_loft.rb' script. It's not finding those and giving an error...

            The errors for pathface.rb and sublend.rb seem similar ? These are Kirill's tools... Not sure on these - let's fix 'loft' first...

            TIG

            1 Reply Last reply Reply Quote 0
            • gillesG Offline
              gilles
              last edited by

              thanks for reply here is a picture of my plugin folder, it seems to be right.


              plugin.jpg

              " c'est curieux chez les marins ce besoin de faire des phrases "

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

                PM Chris Fullmer ???

                TIG

                1 Reply Last reply Reply Quote 0
                • J Offline
                  Jim
                  last edited by

                  Make this change on line 328 of the file: Plugins/clf_simple_loft/clf_simple_loft.rb

                  From:

                  
                  Sketchup.active_model.select_tool Clf_loft.new
                  
                  

                  To:

                  
                  # Sketchup.active_model.select_tool Clf_loft.new
                  
                  

                  Save the file, restart sketchup and try it again.

                  Hi

                  1 Reply Last reply Reply Quote 0
                  • gillesG Offline
                    gilles
                    last edited by

                    Jim, I did what you told me to do.
                    Well it works fine, thank you very much. I will send the info to Chris if he wants to update.
                    thanks again.

                    " c'est curieux chez les marins ce besoin de faire des phrases "

                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      MartinRinehart
                      last edited by

                      @jim said:

                      Make this change on line 328 of the file: Plugins/clf_simple_loft/clf_simple_loft.rb

                      Is this a cross-browser issue, Jim?

                      Author, Edges to Rubies - The Complete SketchUp Tutorial at http://www.MartinRinehart.com/models/tutorial.

                      1 Reply Last reply Reply Quote 0
                      • J Offline
                        Jim
                        last edited by

                        Cross-platform? Possibly.

                        I guess it can happen when scripts are loading that there is no active_model yet. Chris had this line outside of any defined method, so it was being evaluated at the load-time of the script. And apparently, active_model was nil at that moment.

                        Hi

                        1 Reply Last reply Reply Quote 0
                        • Chris FullmerC Offline
                          Chris Fullmer
                          last edited by

                          Thanks for chiming in here and helping everyone. I'll try to look at this and get it fixed in my script.

                          I am in the process ofr moving. I have not had internet access since the 5th, preciesly when you first posted Gilles. Thanks for your pacience, and a big thanks to TIG and Jim for troubleshooting it. Again, I'll try to get the main script fixed. I should have regular internet access again in 1 week from today.

                          Chris

                          Lately you've been tan, suspicious for the winter.
                          All my Plugins I've written

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

                            @jim said:

                            Cross-platform? Possibly.

                            I guess it can happen when scripts are loading that there is no active_model yet ...

                            Note in this post

                            Finally, there is a difference in the way that the Mac boots up SketchUp that you should be cautious about: there is no Sketchup.active_model when the Ruby scripts are first loaded. So if your script is making changes to the active_model at load time, it will not work on the Mac. The answer? Ensure code that references the active model is part of a UI event handler, responding to the user selecting a tool or a menu item. You can also use an AppObserver to get a callback whenever a new model is opened, at which point it's safe to talk to the active_model.

                            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
                            • 1 / 1
                            • First post
                              Last post
                            Buy SketchPlus
                            Buy SUbD
                            Buy WrapR
                            Buy eBook
                            Buy Modelur
                            Buy Vertex Tools
                            Buy SketchCuisine
                            Buy FormFonts

                            Advertisement