Quakespotter.app/lib/ruby-processing/runners/watch.rb
def wipe_out_current_app!
      @runner.kill if @runner.alive?
      app = $app
      return unless app
      app.no_loop
      # Wait for the animation thread to finish rendering
      sleep 0.075
      app.close
      constant_names = app.class.to_s.split(/::/)
      app_class_name = constant_names.pop
      obj = constant_names.inject(Object) {|o, name| o.send(:const_get, name) }
      obj.send(:remove_const, app_class_name)    
    end
# Used to completely remove all traces of the current sketch, 
# so that it can be loaded afresh. Go down into modules to find it, even.
Used to completely remove all traces of the current sketch,
so that it can be loaded afresh. Go down into modules to find it, even.
Used to completely remove all traces of the current sketch so that it can be loaded afresh . Go down into modules to find it even .
def wipe_out_current_app!
      @runner.kill if @runner.alive?
      app = $app
      return unless app
      app.no_loop
      sleep 0.075
      app.close
      constant_names = app.class.to_s.split(/::/)
      app_class_name = constant_names.pop
      obj = constant_names.inject(Object) {|o, name| o.send(:const_get, name) }
      obj.send(:remove_const, app_class_name)    
    end
def wipe_out_current_app! @runner . kill if @runner . alive? app = $app return unless app app . no_loop sleep 0.075 app . close constant_names = app . class . to_s . split ( / :: / ) app_class_name = constant_names . pop obj = constant_names . inject ( Object ) { | o , name | o . send ( :const_get , name ) } obj . send ( :remove_const , app_class_name ) end
Used to completely remove all traces of the current sketch,
so that it can be loaded afresh.
Used to completely remove all traces of the current sketch so that it can be loaded afresh .
# Wait for the animation thread to finish rendering