Something about AppObserver#onQuit
-
Hi folks,
I'm working on a new Ruby extension. Because there is no AppObserver#onSave method, I use onQuit instead. But there seems to be a problem calling methods from your own class in onQuit. You can't call Sketchup.active_model - that seems clear, because if you quit, there is no active model any longer. But you also can't use, say, an instance variable, where you saved the active model to when it was opend. First I thought "OK, I use an instance variable and do some cleanup at the end of the Sketchup session with this 'old' model" So I call another method within my class from onQuit and there a third method is called within my class with the variable as an argument. This call causes a Bug Splat
onQuit > m1 > m2(@var)
I've checked it with some output - Sketchup isn't able to call m2. I have a checkpoint before, in and after the method. Only the checkpoint before is passed.
Sketchup 6.0.277
azuby
-
Sorry I'm no help - have not tried that observer yet. The onSave observer has been requested, and noted by the SU folks, so maybe we'll get that one soon...
Advertisement