Skip to content

Commit 935fa6a

Browse files
authored
Merge pull request #968 from MatzElectronics/demo
add Force-refresh instructions to alert boxes
2 parents d1c9e85 + d0a7055 commit 935fa6a

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

src/main/webapp/cdn/blocklyc.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,11 @@ function cloudCompile(text, action, successHandler) {
155155
}).done(function (data) {
156156
if (data.error) {
157157
if (typeof data['message'] === "string")
158-
alert("BlocklyProp was unable to compile your project:\n" + data['message']);
158+
alert("BlocklyProp was unable to compile your project:\n" + data['message']
159+
+ "\nIt may help to \"Force Refresh\" by pressing Control-Shift-R (Windows/Linux) or Shift-\u2381-R (Mac)");
159160
else
160-
alert("BlocklyProp was unable to compile your project:\n" + data['message'].toString());
161+
alert("BlocklyProp was unable to compile your project:\n" + data['message'].toString()
162+
+ "\nIt may help to \"Force Refresh\" by pressing Control-Shift-R (Windows/Linux) or Shift-\u2381-R (Mac)");
161163
} else {
162164
if (data.success) {
163165
$("#compile-console").val(data['compiler-output'] + data['compiler-error']);
@@ -168,9 +170,11 @@ function cloudCompile(text, action, successHandler) {
168170
}
169171
}).fail(function (data) {
170172
if (typeof data === "string")
171-
alert("BlocklyProp was unable to compile your project:\n----------\n" + data);
173+
alert("BlocklyProp was unable to compile your project:\n----------\n" + data
174+
+ "\nIt may help to \"Force Refresh\" by pressing Control-Shift-R (Windows/Linux) or Shift-\u2381-R (Mac)");
172175
else
173-
alert("BlocklyProp was unable to compile your project:\n----------\n" + data.toString());
176+
alert("BlocklyProp was unable to compile your project:\n----------\n" + data.toString()
177+
+ "\nIt may help to \"Force Refresh\" by pressing Control-Shift-R (Windows/Linux) or Shift-\u2381-R (Mac)");
174178
});
175179
}
176180
}
@@ -199,7 +203,8 @@ function loadIntoRam() {
199203
});
200204
});
201205
} else {
202-
alert("BlocklyPropClient not available to communicate with a microcontroller");
206+
alert("BlocklyPropClient not available to communicate with a microcontroller"
207+
+ "\nIt may help to \"Force Refresh\" by pressing Control-Shift-R (Windows/Linux) or Shift-\u2381-R (Mac)");
203208
}
204209
}
205210

@@ -218,7 +223,8 @@ function loadIntoEeprom() {
218223
});
219224
});
220225
} else {
221-
alert("BlocklyPropClient not available to communicate with a microcontroller");
226+
alert("BlocklyPropClient not available to communicate with a microcontroller"
227+
+ "\nIt may help to \"Force Refresh\" by pressing Control-Shift-R (Windows/Linux) or Shift-\u2381-R (Mac)");
222228
}
223229
}
224230

0 commit comments

Comments
 (0)