Objects: fix for hiding 'getLastAnswer' and 'getTimer' primitives

pull/3/merge
jmoenig 2013-06-05 18:37:44 +02:00
rodzic 3f585e5d5e
commit 12ba9b7703
2 zmienionych plików z 19 dodań i 11 usunięć

Wyświetl plik

@ -1719,3 +1719,11 @@ ______
130517 130517
------ ------
* GUI: user preferences (settings) are now made persistent in localStorage * GUI: user preferences (settings) are now made persistent in localStorage
130604
------
* Morphic: Prevent undesired native dragstart events (introduced in Chrome 27)
130605
------
* Objects: fix for hiding 'getLastAnswer' and 'getTimer' primitives

Wyświetl plik

@ -123,7 +123,7 @@ PrototypeHatBlockMorph*/
// Global stuff //////////////////////////////////////////////////////// // Global stuff ////////////////////////////////////////////////////////
modules.objects = '2013-May-16'; modules.objects = '2013-June-05';
var SpriteMorph; var SpriteMorph;
var StageMorph; var StageMorph;
@ -700,12 +700,12 @@ SpriteMorph.prototype.initBlocks = function () {
spec: 'ask %s and wait', spec: 'ask %s and wait',
defaults: [localize('what\'s your name?')] defaults: [localize('what\'s your name?')]
}, },
reportLastAnswer: { reportLastAnswer: { // retained for legacy compatibility
type: 'reporter', type: 'reporter',
category: 'sensing', category: 'sensing',
spec: 'answer' spec: 'answer'
}, },
getLastAnswer: { // variant for watcher getLastAnswer: {
type: 'reporter', type: 'reporter',
category: 'sensing', category: 'sensing',
spec: 'answer' spec: 'answer'
@ -740,12 +740,12 @@ SpriteMorph.prototype.initBlocks = function () {
category: 'sensing', category: 'sensing',
spec: 'reset timer' spec: 'reset timer'
}, },
reportTimer: { reportTimer: { // retained for legacy compatibility
type: 'reporter', type: 'reporter',
category: 'sensing', category: 'sensing',
spec: 'timer' spec: 'timer'
}, },
getTimer: { // variant for watcher getTimer: {
type: 'reporter', type: 'reporter',
category: 'sensing', category: 'sensing',
spec: 'timer' spec: 'timer'
@ -1073,8 +1073,8 @@ SpriteMorph.prototype.blockAlternatives = {
doStopAll: ['doStopBlock', 'doStop'], doStopAll: ['doStopBlock', 'doStop'],
// sensing: // sensing:
reportLastAnswer: ['reportTimer'], getLastAnswer: ['getTimer'],
reportTimer: ['reportLastAnswer'], getTimer: ['getLastAnswer'],
reportMouseX: ['reportMouseY'], reportMouseX: ['reportMouseY'],
reportMouseY: ['reportMouseX'], reportMouseY: ['reportMouseX'],
@ -1592,7 +1592,7 @@ SpriteMorph.prototype.blockTemplates = function (category) {
blocks.push('-'); blocks.push('-');
blocks.push(block('doAsk')); blocks.push(block('doAsk'));
blocks.push(watcherToggle('getLastAnswer')); blocks.push(watcherToggle('getLastAnswer'));
blocks.push(block('reportLastAnswer')); blocks.push(block('getLastAnswer'));
blocks.push('-'); blocks.push('-');
blocks.push(block('reportMouseX')); blocks.push(block('reportMouseX'));
blocks.push(block('reportMouseY')); blocks.push(block('reportMouseY'));
@ -1604,7 +1604,7 @@ SpriteMorph.prototype.blockTemplates = function (category) {
blocks.push('-'); blocks.push('-');
blocks.push(block('doResetTimer')); blocks.push(block('doResetTimer'));
blocks.push(watcherToggle('getTimer')); blocks.push(watcherToggle('getTimer'));
blocks.push(block('reportTimer')); blocks.push(block('getTimer'));
blocks.push('-'); blocks.push('-');
blocks.push(block('reportAttributeOf')); blocks.push(block('reportAttributeOf'));
blocks.push('-'); blocks.push('-');
@ -3838,7 +3838,7 @@ StageMorph.prototype.blockTemplates = function (category) {
blocks.push(block('doAsk')); blocks.push(block('doAsk'));
blocks.push(watcherToggle('getLastAnswer')); blocks.push(watcherToggle('getLastAnswer'));
blocks.push(block('reportLastAnswer')); blocks.push(block('getLastAnswer'));
blocks.push('-'); blocks.push('-');
blocks.push(block('reportMouseX')); blocks.push(block('reportMouseX'));
blocks.push(block('reportMouseY')); blocks.push(block('reportMouseY'));
@ -3848,7 +3848,7 @@ StageMorph.prototype.blockTemplates = function (category) {
blocks.push('-'); blocks.push('-');
blocks.push(block('doResetTimer')); blocks.push(block('doResetTimer'));
blocks.push(watcherToggle('getTimer')); blocks.push(watcherToggle('getTimer'));
blocks.push(block('reportTimer')); blocks.push(block('getTimer'));
blocks.push('-'); blocks.push('-');
blocks.push(block('reportAttributeOf')); blocks.push(block('reportAttributeOf'));
blocks.push('-'); blocks.push('-');