SketchUcation Plugin Store

 

 

[Code] Method Model.start_operation for SketchUp 5-6

[Code] Method Model.start_operation for SketchUp 5-6

Postby AlexMozg » Tue May 26, 2009 10:22 pm

Let me introduce you the following idea of the compatibility of the 'start_operation' method of Sketchup 7 with 4 arguments and 'start_operation' method of the earlier Sketchup versions with 1 argument.

Code: Select all
if Sketchup.version_number < 7000000
  class Sketchup::Model
    alias :old_start_operation :start_operation
    def start_operation(*args)
        old_start_operation args.at(0)
    end#def
    private :old_start_operation
  end#class
end#if

Now the 'start_operation' method of the earlier Sketchup versions takes on any number of arguments.
How do you like this method?
:?: :?: :?:
AlexMozg
 
Posts: 65
Joined: Sun Feb 24, 2008 8:33 am
Name: AlexMozg

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago

Are you a Premium Member? Get your freebies here. Are you not a Premium Member yet? Upgrade your account to grab these freebies instantly.

Ad Machine
Robot
 
Posts: 2012

Return to Developers' Forum

Who is online

Users browsing this forum: ktkoh and 6 guests