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...
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register LoginAdvertisement