And to expect that it creates a fully-working environment that can that have synths created within it. However, while flock.enviro currently is defined with the fluid.resolveRootSingle grade—making it a singleton within the IoC tree—this singleton isn't visible to old-style code that still expects to be able to grab a reference to the environment via the global flock.environment global variable.
I have created a [gist that shows a viable workaround[(https://gist.github.com/colinbdclark/7a6115f840274b722ea4). In the short term, this onCreate listener should be added directly to the flock.enviro grade, and in the medium-term, the incorrectly-named "parser" should be fully refactored as a component that can have an environment instance injected into it.
Due to lingering factoring bugs related to #59, one cannot instantiate a
flock.enviro
without callingflock.init()
directly.It should be possible to do this:
And to expect that it creates a fully-working environment that can that have synths created within it. However, while
flock.enviro
currently is defined with thefluid.resolveRootSingle
grade—making it a singleton within the IoC tree—this singleton isn't visible to old-style code that still expects to be able to grab a reference to the environment via the globalflock.environment
global variable.I have created a [gist that shows a viable workaround[(https://gist.github.com/colinbdclark/7a6115f840274b722ea4). In the short term, this
onCreate
listener should be added directly to theflock.enviro
grade, and in the medium-term, the incorrectly-named "parser" should be fully refactored as a component that can have an environment instance injected into it.