@@ -696,18 +696,6 @@ BlocklyApps.init = function(config) {
696
696
697
697
if (config.level.startBlocks) {
698
698
BlocklyApps.editor.setValue(config.level.startBlocks);
699
- } else {
700
- var startText = '// ' + msg.typeHint() + '\n';
701
- var codeFunctions = config.level.codeFunctions;
702
- // Insert hint text from level codeFunctions into editCode area
703
- if (codeFunctions) {
704
- var hintText = '';
705
- for (var i = 0; i < codeFunctions.length; i++) {
706
- hintText += " " + codeFunctions[i].func + "();";
707
- }
708
- startText += '// ' + msg.typeFuncs().replace('%1', hintText) + '\n';
709
- }
710
- BlocklyApps.editor.setValue(startText);
711
699
}
712
700
});
713
701
}
@@ -4487,7 +4475,7 @@ exports.workspaceCode = function(blockly) {
4487
4475
exports.marshalNativeToInterpreter = function (interpreter, nativeVar, nativeParentObj, maxDepth) {
4488
4476
var retVal;
4489
4477
if (typeof maxDepth === "undefined") {
4490
- maxDepth = 4 ; // default to 4 levels of depth
4478
+ maxDepth = Infinity ; // default to inifinite levels of depth
4491
4479
}
4492
4480
if (maxDepth === 0) {
4493
4481
return interpreter.createPrimitive(undefined);
@@ -4535,11 +4523,11 @@ exports.marshalNativeToInterpreter = function (interpreter, nativeVar, nativePar
4535
4523
/**
4536
4524
* Generate a native function wrapper for use with the JS interpreter.
4537
4525
*/
4538
- exports.makeNativeMemberFunction = function (interpreter, nativeFunc, nativeParentObj) {
4526
+ exports.makeNativeMemberFunction = function (interpreter, nativeFunc, nativeParentObj, maxDepth ) {
4539
4527
return function() {
4540
4528
// Call the native function:
4541
4529
var nativeRetVal = nativeFunc.apply(nativeParentObj, arguments);
4542
- return exports.marshalNativeToInterpreter(interpreter, nativeRetVal, null);
4530
+ return exports.marshalNativeToInterpreter(interpreter, nativeRetVal, null, maxDepth );
4543
4531
};
4544
4532
};
4545
4533
@@ -11891,7 +11879,7 @@ with (locals || {}) { (function(){
11891
11879
var msg = require('../../locale/ar_sa/common');
11892
11880
var hideRunButton = locals.hideRunButton || false;
11893
11881
; buf.push('\n\n<div id="rotateContainer" style="background-image: url(https://github.com/',%20escape((6,%20%20assetUrl('media/mobile_tutorial_turnphone.png') )), ')">\n <div id="rotateText">\n <p>', escape((8, msg.rotateText() )), '<br>', escape((8, msg.orientationLock() )), '</p>\n </div>\n</div>\n\n');12; var instructions = function() {; buf.push(' <div id="bubble" class="clearfix">\n <table id="prompt-table">\n <tr>\n <td id="prompt-icon-cell">\n <img id="prompt-icon"/>\n </td>\n <td id="prompt-cell">\n <p id="prompt">\n </p>\n </td>\n </tr>\n </table>\n <div id="ani-gif-preview-wrapper">\n <div id="ani-gif-preview">\n <img id="play-button" src="', escape((26, assetUrl('media/play-circle.png') )), '"/>\n </div>\n </div>\n </div>\n');30; };; buf.push('\n');31; // A spot for the server to inject some HTML for help content.
11894
- var helpArea = function(html) {; buf.push(' ');32; if (html) {; buf.push(' <div id="helpArea">\n ', (33, html ), '\n </div>\n ');35; }; buf.push('');35; };; buf.push('\n<div id="visualizationColumn">\n <div id="visualization">\n ', (38, data.visualization ), '\n </div>\n\n <div id="belowVisualization">\n\n <div id="gameButtons">\n <button id="runButton" class="launch blocklyLaunch ', escape((44, hideRunButton ? 'invisible' : '')), '">\n <div>', escape((45, msg.runProgram() )), '</div>\n <img src="', escape((46, assetUrl('media/1x1.gif') )), '" class="run26"/>\n </button>\n <button id="resetButton" class="launch blocklyLaunch" style="display: none">\n <div>', escape((49, msg.resetProgram() )), '</div>\n <img src="', escape((50, assetUrl('media/1x1.gif') )), '" class="reset26"/>\n </button>\n ');52; if (data.controls) { ; buf.push('\n ', (53, data.controls ), '\n ');54; } ; buf.push('\n ');55; if (data.extraControlRows) { ; buf.push('\n ', (56, data.extraControlRows ), '\n ');57; } ; buf.push('\n </div>\n\n ');60; instructions() ; buf.push('\n ');61; helpArea(data.helpHtml) ; buf.push('\n\n </div>\n</div>\n\n');66; if (data.editCode) { ; buf.push('\n <div id="codeWorkspace">\n');68; } else { ; buf.push('\n <div id="blockly">\n');70; } ; buf.push('\n <div id="headers" dir="', escape((71, data.localeDirection )), '">\n <div id="toolbox-header" class="blockly-header"><span>', escape((72, msg.toolboxHeader() )), '</span></div>\n <div id="workspace-header" class="blockly-header">\n <span id="workspace-header-span">', escape((74, msg.workspaceHeader())), ' </span>\n <div id="blockCounter">\n <div id="blockUsed" class=', escape((76, data.blockCounterClass )), '>\n ', escape((77, data.blockUsed )), '\n </div>\n <span> /</span>\n <span id="idealBlockNumber">', escape((80, data.idealBlockNumber )), '</span>\n </div>\n </div>\n <div id="show-code-header" class="blockly-header"><span>', escape((83, msg.showCodeHeader() )), '</span></div>\n </div>\n ');85; if (data.editCode) { ; buf.push('\n <div id="codeTextbox" contenteditable spellcheck=false></div>\n ');87; } ; buf.push('\n</div>\n\n<div class="clear"></div>\n'); })();
11882
+ var helpArea = function(html) {; buf.push(' ');32; if (html) {; buf.push(' <div id="helpArea">\n ', (33, html ), '\n </div>\n ');35; }; buf.push('');35; };; buf.push('\n<div id="visualizationColumn">\n <div id="visualization">\n ', (38, data.visualization ), '\n </div>\n\n <div id="belowVisualization">\n\n <div id="gameButtons">\n <button id="runButton" class="launch blocklyLaunch ', escape((44, hideRunButton ? 'invisible' : '')), '">\n <div>', escape((45, msg.runProgram() )), '</div>\n <img src="', escape((46, assetUrl('media/1x1.gif') )), '" class="run26"/>\n </button>\n <button id="resetButton" class="launch blocklyLaunch" style="display: none">\n <div>', escape((49, msg.resetProgram() )), '</div>\n <img src="', escape((50, assetUrl('media/1x1.gif') )), '" class="reset26"/>\n </button>\n ');52; if (data.controls) { ; buf.push('\n ', (53, data.controls ), '\n ');54; } ; buf.push('\n ');55; if (data.extraControlRows) { ; buf.push('\n ', (56, data.extraControlRows ), '\n ');57; } ; buf.push('\n </div>\n\n ');60; instructions() ; buf.push('\n ');61; helpArea(data.helpHtml) ; buf.push('\n\n </div>\n</div>\n\n');66; if (data.editCode) { ; buf.push('\n <div id="codeWorkspace">\n');68; } else { ; buf.push('\n <div id="blockly">\n');70; } ; buf.push('\n <div id="headers" dir="', escape((71, data.localeDirection )), '">\n <div id="toolbox-header" class="blockly-header"><span>', escape((72, msg.toolboxHeader() )), '</span></div>\n <div id="workspace-header" class="blockly-header">\n <span id="workspace-header-span">', escape((74, msg.workspaceHeader())), ' </span>\n <div id="blockCounter">\n <div id="blockUsed" class=', escape((76, data.blockCounterClass )), '>\n ', escape((77, data.blockUsed )), '\n </div>\n <span> /</span>\n <span id="idealBlockNumber">', escape((80, data.idealBlockNumber )), '</span>\n </div>\n </div>\n <div id="show-code-header" class="blockly-header"><span>', escape((83, msg.showCodeHeader() )), '</span></div>\n </div>\n ');85; if (data.editCode) { ; buf.push('\n <div id="codeTextbox"></div>\n ');87; } ; buf.push('\n</div>\n\n<div class="clear"></div>\n'); })();
11895
11883
}
11896
11884
return buf.join('');
11897
11885
};
@@ -12806,10 +12794,6 @@ exports.savedToGallery = function(d){return "تم الحفط في المعرض!"
12806
12794
12807
12795
exports.shareFailure = function(d){return "عذراً، لا يمكن أن نشارك هذا البرنامج."};
12808
12796
12809
- exports.typeFuncs = function(d){return "الدوال المتاحة: %1"};
12810
-
12811
- exports.typeHint = function(d){return "تذكر أن الأقواس والفواصل المنقوطة ضرورية."};
12812
-
12813
12797
exports.workspaceHeader = function(d){return "أجمع القطع هنا: "};
12814
12798
12815
12799
exports.workspaceHeaderJavaScript = function(d){return "أكتب الكود البرمجي جافاسكريبت هنا"};
0 commit comments