diff --git a/Nasal/canvas/gui.nas b/Nasal/canvas/gui.nas index abfa9facc..956724b54 100644 --- a/Nasal/canvas/gui.nas +++ b/Nasal/canvas/gui.nas @@ -71,7 +71,7 @@ var Window = { if( !isa(canvas_, canvas.Canvas) ) return debug.warn("Not a canvas.Canvas"); - canvas_.addPlacement({type: "window", index: me._node.getIndex()}); + canvas_.addPlacement({type: "window", "id": me.get("id")}); me['_canvas'] = canvas_; }, # Get the displayed canvas @@ -214,3 +214,12 @@ var Window = { }); } }; + +# Provide old 'Dialog' for backwards compatiblity (should be removed for 3.0) +var Dialog = { + new: func(size, type = nil, id = nil) + { + debug.warn("'canvas.Dialog' is deprectated! (use canvas.Window instead)"); + return Window.new(size, type, id); + } +};