thomthom / sketchup-webdialogs-the-lost-manual

Collection of unofficial documentation of SketchUp's WebDialog class.
24 stars 2 forks source link

Window.set_on_close page #8

Open DanRathbun opened 6 years ago

DanRathbun commented 6 years ago

WebDialog.set_on_close page would be helpful to warn of double calling (at least in SU 2016 on Windows.)

Ref ... UI::WebDialog set_on_close block is called twice

thomthom commented 6 years ago

I've not been able to reproduce that. (See linked issue.)

DanRathbun commented 6 years ago

This was actually a circular code call. (Programmer error!) The LM should warn not to call close() from within the set_on_close() block or any code that it calls.

Ie, the API docs are not clear that the window is still visible, and will not actually be destroyed until the block finishes and set_on_close() returns.