function FileBrowser() { // Assign a dialog instance to a variable // in the object so it can be reference // // Add a parent property to the data // object being passed to the dialog control // can communicate with the file browser // control this.dialog = new Dialog({ width: 400, height: 300, canclose: true, parent: this }); this.filter = []; this.selectedFile; } FileBrowser.prototype.open = function(data) { this.filter = data.filter; this.directory = data.directory; this.dialog.open(); } FileBrowser.prototype.close = function() { this.dialog.close(); }