• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

Undefined method

Scheduled Pinned Locked Moved Developers' Forum
12 Posts 7 Posters 670 Views
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.
  • G Offline
    gilles
    last edited by 5 Sept 2009, 09:08

    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
    • G Offline
      gilles
      last edited by 7 Sept 2009, 07:05

      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 7 Sept 2009, 07:55

        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
        • T Offline
          TIG Moderator
          last edited by 7 Sept 2009, 08:05

          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
          • G Offline
            gilles
            last edited by 7 Sept 2009, 11:02

            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
            • T Offline
              TIG Moderator
              last edited by 7 Sept 2009, 12:09

              PM Chris Fullmer ???

              TIG

              1 Reply Last reply Reply Quote 0
              • J Offline
                Jim
                last edited by 7 Sept 2009, 16:22

                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
                • G Offline
                  gilles
                  last edited by 9 Sept 2009, 14:53

                  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 11 Sept 2009, 16:44

                    @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 11 Sept 2009, 18:19

                      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 11 Sept 2009, 19:00

                        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 12 Sept 2009, 01:50

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

                          Advertisement