But there currently is no EASY way to workaround like …
Sketchup::LayersObserver::notify(:onLayerChanged, layers, layer)
… because there is no way to query collection objects and ask if they have an such an observer attached.
Likewise you could find objects that respond to
:onLayerChanged method, via
ObjectSpace.each_object(), but again no way to ask it if it is actually attached to the layers collection object we are interested in.
(On PC you could make an assumption as there is only 1 model open, but what about on Mac ? Then again I suppose the core only notifies observers for active model objects ?)