Web Dialog bug?
-
Hi there
Currently I am creating some web dialogs and having some real issues with stability.
For no reason at all the dialog will just shut and what ever I have been working on will be lost.
Have any of you guys had this issue or is it just me?
Any help would be appreciated. I am using Sketchup 7
CheersBrett
-
One have to be careful especially when using a Tool and a Webdialog (and Observers).
I think you crash SU because your tool closes a WebDialog already closed or something similar. It can also be caused by creating several instances of a same WebDialog without closing former.In a thread called Tool <> WebDialog <> Observers relationship I have started to build a 'proper' way of creating a Tool, WebDialog and an Observer. It is far from perfect. I am still learning how to make it error-proof.
-
Brett,
It sounds like Ruby is garbage collecting the dialog - I've had this happen. If you are using a local variable to reference the dialog and the variable goes out of scope, it will be GC'd.
# This dlg variable will get GC'd sooner or later and the # dialog may go away. def create_dialog dlg = WebDialog.new(...) dlg.show endOne common solution is to use a module to create a namespace (a scope,) and use a class variable to reference the dialog.
-
Thanks for the replies.
The only ruby code I am using is just to load the dialog to test it so there is no namespacing etc.
Sounds like that will solve the problem,so I will keep that in mind as I get further along.Cheers
Brett -
@brett mcallister said:
Thanks for the replies.
The only ruby code I am using is just to load the dialog to test it so there is no namespacing etc.
Sounds like that will solve the problem,so I will keep that in mind as I get further along.Cheers
BrettFailure to include two parameters in the code block of an action callback is a crime punishable by BugSplat.
PC or Mac?
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