diff --git a/pd/nw/dialog_text.html b/pd/nw/dialog_text.html index 6e7b95a7e920f38f87d504d63c880e885c9e5b5d..e995e469c0b5dd93cb36693a0314b1bf70897607 100644 --- a/pd/nw/dialog_text.html +++ b/pd/nw/dialog_text.html @@ -106,8 +106,13 @@ function register_window_id(gfxstub, text_string) { add_events(gfxstub); translate_form(); + // We request the text data only after we're certain our window + // has loaded. Otherwise the node.js context might try to populate + // the textarea before the window has actually loaded. + + // This doesn't happen in Pd Vanilla because tcl/tk synchronously + // creates the window. pdgui.pdsend(gfxstub, "map"); -// populate_form(text_string); // Fill the form we created with the actual data // We don't turn on rendering of the "container" div until // We've finished displaying all the spans and populating the @@ -132,14 +137,6 @@ function translate_form() { } } -function get_attr(name, attrs) { - return attrs[attrs.indexOf(name) + 1]; -} - -function get_elem(name) { - return document.getElementById(name); -} - function close_window() { pdgui.pdsend(pd_object_callback, "close"); pdgui.remove_dialogwin(pd_object_callback);