[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?
:?: :?: :?:
0

AlexMozg 
PluginStore Author
PluginStore Author
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 


 

Return to Developers' Forum

Who is online

Users browsing this forum: No registered users and 10 guests

Visit our sponsors: