Support for debugging shared projects

pull/3/merge
jmoenig 2013-04-09 18:03:44 +02:00
rodzic e23a694409
commit 74ad2abc66
2 zmienionych plików z 50 dodań i 3 usunięć

52
gui.js
Wyświetl plik

@ -267,8 +267,8 @@ IDE_Morph.prototype.openIn = function (world) {
myself.rawOpenCloudDataString(projectData);
},
function () {
this.shield.destroy();
this.shield = null;
myself.shield.destroy();
myself.shield = null;
msg.destroy();
myself.toggleAppMode(true);
myself.runScripts();
@ -1694,7 +1694,6 @@ IDE_Morph.prototype.cloudMenu = function () {
null,
new Color(100, 0, 0)
);
menu.addLine();
menu.addItem(
'export project as cloud data...',
function () {
@ -1709,6 +1708,53 @@ IDE_Morph.prototype.cloudMenu = function () {
null,
new Color(100, 0, 0)
);
menu.addLine();
menu.addItem(
'open shared project from cloud...',
function () {
myself.prompt('Author name…', function (usr) {
myself.prompt('Project name...', function (prj) {
var id = 'Username=' +
encodeURIComponent(usr) +
'&ProjectName=' +
encodeURIComponent(prj);
myself.showMessage(
'Fetching project\nfrom the cloud...'
);
SnapCloud.getPublicProject(
id,
function (projectData) {
var msg;
if (!Process.prototype.isCatchingErrors) {
window.open(
'data:text/xml,' + projectData
);
}
myself.nextSteps([
function () {
msg = myself.showMessage(
'Opening project...'
);
},
function () {
myself.rawOpenCloudDataString(
projectData
);
},
function () {
msg.destroy();
}
]);
},
myself.cloudError()
);
});
});
},
null,
new Color(100, 0, 0)
);
}
menu.popup(world, pos);
};

Wyświetl plik

@ -1606,3 +1606,4 @@ ______
* GUI: display shared project names bold typed in the project dialog
* GUI: Feedback msg when sharing / unsharing projects
* GUI: Shield (hide) IDE while opening a shared project for presentation
* GUI: Support for debugging shared projects