Skip to content

Initial license get during load #20

Open
@DanRathbun

Description

@DanRathbun

At the bottom of the Licenseing tutorial module ...
"master/examples/99_license/ex_hello_license/main.rb"

    # Fetching a license here so that it will be checked by SketchUp during
    # startup. This will include the extension in the dialog that warns about
    # missing licenses.
    ext_id = '6cce9800-40b0-4dd9-9671-8d55a05ae1e8'
    ext_lic = Sketchup::Licensing.get_extension_license(ext_id)

This is a bit contradictory to the text in the self.create_cube method.

How about wrapping it within an init method ?

    def self.init
      # Fetching a license here so that it will be checked by SketchUp during
      # startup. This will include the extension in the dialog that warns about
      # missing licenses.
      ext_id = '6cce9800-40b0-4dd9-9671-8d55a05ae1e8'
      ext_lic = Sketchup::Licensing.get_extension_license(ext_id)
    end

    self.init()

... or don't assign the results to local variables?

    Sketchup::Licensing.get_extension_license(
      '6cce9800-40b0-4dd9-9671-8d55a05ae1e8'
    )

?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions