Commit e1b34a60 authored by neil.fraser@gmail.com's avatar neil.fraser@gmail.com

Fix some compile warnings.

git-svn-id: http://blockly.googlecode.com/svn/trunk@1751 c400ca83-b69d-9dd7-9705-49c6b8615e23
parent 04e2ed58
......@@ -86,6 +86,7 @@ BlocklyApps.LANGUAGE_NAME = {
'ro': 'Română',
'pt-br': 'Português Brasileiro',
'ru': 'Русский',
'sc': 'Sardu',
'sco': 'Scots',
'si': 'සිංහල',
'sk': 'Slovenčina',
......@@ -99,8 +100,7 @@ BlocklyApps.LANGUAGE_NAME = {
'uk': 'Українська',
'vi': 'Tiếng Việt',
'zh-hans': '簡體中文',
'zh-hant': '正體中文',
'zh-tw': '國語'
'zh-hant': '正體中文'
};
/**
......@@ -116,7 +116,7 @@ BlocklyApps.LANGUAGE_PACK = {
'az-latn': 'msg/js/az-latn.js',
'az': 'msg/js/az.js',
'ca': 'msg/js/ca.js',
'cdo': 'msg/js/zh_hant.js',
'cdo': 'msg/js/zh-hant.js',
'cs': 'msg/js/cs.js',
'da': 'msg/js/da.js',
'de': 'msg/js/de.js',
......
......@@ -261,9 +261,6 @@ Blockly.Xml.domToBlock = function(workspace, xmlBlock, opt_reuseBlock) {
block.parent_ = parentBlock;
} else {
block = Blockly.Block.obtain(workspace, prototypeName);
// if (id) {
// block.id = parseInt(id, 10);
// }
}
if (!block.svg_) {
block.initSvg();
......@@ -407,7 +404,7 @@ Blockly.Xml.deleteNext = function(xmlBlock) {
};
// Export symbols that would otherwise be renamed by Closure compiler.
Blockly['Xml'] = Blockly.Xml;
Blockly['Xml'] = Blockly.Xml || {};
Blockly.Xml['domToText'] = Blockly.Xml.domToText;
Blockly.Xml['domToWorkspace'] = Blockly.Xml.domToWorkspace;
Blockly.Xml['textToDom'] = Blockly.Xml.textToDom;
......
......@@ -164,7 +164,7 @@ Blockly.Dart.scrub_ = function(block, code) {
// Collect comment for this block.
var comment = block.getCommentText();
if (comment) {
commentCode += this.prefixLines(comment, '// ') + '\n';
commentCode += Blockly.Dart.prefixLines(comment, '// ') + '\n';
}
// Collect comments for all value arguments.
// Don't collect comments for nested statements.
......@@ -172,15 +172,15 @@ Blockly.Dart.scrub_ = function(block, code) {
if (block.inputList[x].type == Blockly.INPUT_VALUE) {
var childBlock = block.inputList[x].connection.targetBlock();
if (childBlock) {
var comment = this.allNestedComments(childBlock);
var comment = Blockly.Dart.allNestedComments(childBlock);
if (comment) {
commentCode += this.prefixLines(comment, '// ');
commentCode += Blockly.Dart.prefixLines(comment, '// ');
}
}
}
}
}
var nextBlock = block.nextConnection && block.nextConnection.targetBlock();
var nextCode = this.blockToCode(nextBlock);
var nextCode = Blockly.Dart.blockToCode(nextBlock);
return commentCode + code + nextCode;
};
......@@ -183,7 +183,7 @@ Blockly.JavaScript.scrub_ = function(block, code) {
// Collect comment for this block.
var comment = block.getCommentText();
if (comment) {
commentCode += this.prefixLines(comment, '// ') + '\n';
commentCode += Blockly.JavaScript.prefixLines(comment, '// ') + '\n';
}
// Collect comments for all value arguments.
// Don't collect comments for nested statements.
......@@ -191,15 +191,15 @@ Blockly.JavaScript.scrub_ = function(block, code) {
if (block.inputList[x].type == Blockly.INPUT_VALUE) {
var childBlock = block.inputList[x].connection.targetBlock();
if (childBlock) {
var comment = this.allNestedComments(childBlock);
var comment = Blockly.JavaScript.allNestedComments(childBlock);
if (comment) {
commentCode += this.prefixLines(comment, '// ');
commentCode += Blockly.JavaScript.prefixLines(comment, '// ');
}
}
}
}
}
var nextBlock = block.nextConnection && block.nextConnection.targetBlock();
var nextCode = this.blockToCode(nextBlock);
var nextCode = Blockly.JavaScript.blockToCode(nextBlock);
return commentCode + code + nextCode;
};
......@@ -165,7 +165,7 @@ Blockly.Python.scrub_ = function(block, code) {
// Collect comment for this block.
var comment = block.getCommentText();
if (comment) {
commentCode += this.prefixLines(comment, '# ') + '\n';
commentCode += Blockly.Python.prefixLines(comment, '# ') + '\n';
}
// Collect comments for all value arguments.
// Don't collect comments for nested statements.
......@@ -173,15 +173,15 @@ Blockly.Python.scrub_ = function(block, code) {
if (block.inputList[x].type == Blockly.INPUT_VALUE) {
var childBlock = block.inputList[x].connection.targetBlock();
if (childBlock) {
var comment = this.allNestedComments(childBlock);
var comment = Blockly.Python.allNestedComments(childBlock);
if (comment) {
commentCode += this.prefixLines(comment, '# ');
commentCode += Blockly.Python.prefixLines(comment, '# ');
}
}
}
}
}
var nextBlock = block.nextConnection && block.nextConnection.targetBlock();
var nextCode = this.blockToCode(nextBlock);
var nextCode = Blockly.Python.blockToCode(nextBlock);
return commentCode + code + nextCode;
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment