sketchucation logo sketchucation
    • Login
    1. Home
    2. RichMorin
    3. Posts
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 41
    • Posts 104
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: Ruby methods in dynamic component attributes?

      Thanks! That is exactly what I was looking for! I've updated my blog entry (http://www.cfcl.com/rdm/weblog/archives/001716.html) with some speculation on how this capability might be used.

      posted in Developers' Forum
      RichMorinR
      RichMorin
    • Ruby methods in dynamic component attributes?

      It occurs to me that it would be very convenient and powerful
      to be able to define Ruby methods and invoke them in dynamic
      component attribute expressions, as:

      =foo_method(42)

      However, I don't see any indication that this is possible.
      Pointers, anyone?

      -r

      posted in Developers' Forum
      RichMorinR
      RichMorin
    • Using Cucumber with SketchUp

      I've been working on ways to use Cucumber to test SketchUp plugins. I've written up my current results and plans in:

      "Using Cucumber with SketchUp"
      http://www.cfcl.com/rdm/weblog/archives/001714.html

      posted in Developers' Forum
      RichMorinR
      RichMorin
    • Accessing Ruby libraries

      I'd like to use Cucumber to run tests on SketchUp plugin code. In pursuit of this, I've been playing with setting up a DRb server in a plugin. This failed, at first, because SU doesn't provide the DRb library. So, I tried adding my local (Mac OS X 10.5.8) libraries to "$:". This crashed, as described in http://pastie.org/675716.

      So, I'm really looking for two kinds of help. I'd like to know whether and how I can add libraries to SU. I'd also be happy to get comments and suggestions on how to approach the general problem of linking Cucumber and SketchUp.

      While I'm stuck on DRb, I've been thinking about passing files back and forth, using rename() to ensure that I don't try to read a file before it's ready. Basically, Cucumber (C) and SketchUp (S) would interact as follows:

      πŸ˜„ create x.tst.tmp, output test code, close file
      πŸ˜„ rename x.tst.tmp to x.tst
      S: detect x.tst, read test code
      S: rename x.tst to x.tst.old
      S: eval the test code
      S: create x.res.tmp, output results, close file
      S: rename x.res.tmp to x.res
      πŸ˜„ detect x.res, read results
      πŸ˜„ rename x.res to x.res.old
      πŸ˜„ handle results

      Does this seem like a reasonable approach?

      posted in Developers' Forum
      RichMorinR
      RichMorin
    • 1 / 1