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

    Who changed extensions.rb?

    Scheduled Pinned Locked Moved Developers' Forum
    22 Posts 11 Posters 2.1k Views 11 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.
    • AdamBA Offline
      AdamB
      last edited by

      Its incredibly annoying when people put out these crappy plugins like this.

      I still have to check for that ****ing "Matchbox" plugin which totally screws the Sketchup 'class' system.

      But you know, the headlong rush to these highly introspective/reflective languages which offer little in the way of "sealing" code is such a problem.

      A Class definition once defined should be sealed and immutable. If you wish to specialize then derive from the super class and specialize-away, but being able to post something and walk away is pretty dangerous.

      Can we hunt him down and have him shot? Thats reasonable isn't it? πŸ˜„

      Adam

      Developer of LightUp Click for website

      1 Reply Last reply Reply Quote 0
      • fredo6F Offline
        fredo6
        last edited by

        I don't know if it is Sunposition tha removes or add the extension.rb, but, as said by Adam, it is for sure the source of conflicts because it overrides basic Ruby classes (and strangely for no special reason).

        I came across this conflict between Sunposition and Curviloft.
        I tried to contact the author, but still no answer

        See that post, where I posted a modified version of sunposition.rb which is clean vis-avis Ruby and Sketchup

        Fredo

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

          I did something similar with someones 'VirtualWind' script that messed with progressbar... πŸ˜’

          TIG

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

            I also contacted the developer of Sunposition - twice - still no response... πŸ‘Ž πŸ‘Ž

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

            1 Reply Last reply Reply Quote 0
            • AdamBA Offline
              AdamB
              last edited by

              Hey, here's a thought.

              Given we can't enforce a 'developer quality threshold', there is always going to dodgy code out there.

              Can we use Ruby namespaces to sandbox each plugins view of the SketchUp classes? So if a plugin chooses to redefine true to be false and false to be SketchUp::Face etc. Well, it will just die in their plugin. Not mine. πŸ˜„

              So something like alias the Sketchup:: namespace to be unique for each plugin.

              How hard can it be? I'll leave the easy bit to others..

              have a good one.

              Developer of LightUp Click for website

              1 Reply Last reply Reply Quote 0
              • KrisidiousK Offline
                Krisidious
                last edited by

                you developers here on SCF could institute a rating system that told we layman if a plugin met certain standards. and that would give incentive to developers to meet that minimum standard if they wanted the SCF audience.

                By: Kristoff Rand
                Home DesignerUnique House Plans

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

                  Could we just re-write the sunposition plugin and send him an updated copy? It does not re-write that much. I started doing it yesterday, but in the end got in a little bit over my head. Anyone wanna give it a go?

                  Chris

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

                  1 Reply Last reply Reply Quote 0
                  • Dan RathbunD Offline
                    Dan Rathbun
                    last edited by

                    @adamb said:

                    A Class definition once defined should be sealed and immutable. If you wish to specialize then derive from the super class and specialize-away, ...

                    The augmentation of Ruby objects at runtime is a very powerful (and one of my favorite,) features of the Ruby language. This is what is called a Dynamic Language.

                    Without it, Ruby would be as mundane as Pascal, etc.

                    I'm not here much anymore.

                    1 Reply Last reply Reply Quote 0
                    • Dan RathbunD Offline
                      Dan Rathbun
                      last edited by

                      @adamb said:

                      Can we use Ruby namespaces to sandbox each plugins view of the SketchUp classes?

                      Sometimes this works.. many times not.

                      The major problems are with the Sketchup::Drawingelement subclasses. All the API add entity methods (as well as the Dynamic Components extension,) are hardcoded to only accept exact class names (such as Sketchup::Face,) instead of accepting arg.kind_of?(Sketchup::Face)

                      So cloning the toplevel Sketchup module into another namespace may not work.

                      EDIT: But don't let my thots keep you from experimenting ... (I'd be happy to be proved wrong on this.)

                      I'm not here much anymore.

                      1 Reply Last reply Reply Quote 0
                      • fredo6F Offline
                        fredo6
                        last edited by

                        @chris fullmer said:

                        Could we just re-write the sunposition plugin and send him an updated copy? It does not re-write that much. I started doing it yesterday, but in the end got in a little bit over my head. Anyone wanna give it a go?

                        Chris

                        Chris,

                        I did it actually. See this post, which contains the modified version

                        May be we should publish it in a place which is more accessible

                        Fredo

                        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