if ( event.type == Blockly.Events.BLOCK_CREATE && event.json.type == "hat") {
if (workspace.getBlockById(event.json.id))
{
var myHatBlock = workspace.getBlockById(event.json.id);
if (!myHatBlock.getCommentText()) {
myHatBlock.setCommentText(Blockly.Msg["HAT_DEFAULT_COMMENT"]);
myHatBlock.comment.setBubbleSize(300, 100);
}
startingBlock.comment.setVisible(true);
}
}