No global $app for propane
Replacing ruby-processing global $app with a module variable
The original ruby-processing implementation created a $app variable, that gives global access to the sketch applet. It turns out that may not have been necessary, yet I have retained the global $app in propane and JRubyArt, however I’m pretty confident that I can replace the global $app
with Propane.app
. See below for propane:-
module Propane
class << self
attr_accessor :app
end
# ... and thereafter replace $app with Propane.app
end
Any sketch whose classes use $app
, should be changed to use Propane.app
or should include Propane::Proxy
I have made good progress converting the propane-examples, and as a bonus I intent to release alternative implementations of some sketches to illustrate the alternative of using delegators
(forwardable) in place of include Processing::Proxy
to access Sketch methods.
Look out for propane-2.5.0.