added "with inpus" to TELL and ASK prims

changed TELL's C-shape to command-style input
upd4.1
Jens Mönig 2017-10-17 09:19:53 +02:00
rodzic b7f1146a4d
commit da9c293321
3 zmienionych plików z 12 dodań i 3763 usunięć

Plik diff jest za duży Load Diff

Wyświetl plik

@ -83,7 +83,7 @@ BlockEditorMorph, BlockDialogMorph, PrototypeHatBlockMorph, localize,
TableMorph, TableFrameMorph, normalizeCanvas, BooleanSlotMorph, HandleMorph,
AlignmentMorph*/
modules.objects = '2017-October-11';
modules.objects = '2017-October-19';
var SpriteMorph;
var StageMorph;
@ -745,17 +745,18 @@ SpriteMorph.prototype.initBlocks = function () {
// Message passing - very experimental
doTellTo: {
doTellTo: { // under construction +++
dev: true,
type: 'command',
category: 'control',
spec: 'tell %spr to %cl'
// spec: 'tell %spr to %cl' // I liked this version much better, -Jens
spec: 'tell %spr to %cmdRing %inputs'
},
reportAskFor: {
dev: true,
type: 'reporter',
category: 'control',
spec: 'ask %spr for %repRing'
spec: 'ask %spr for %repRing %inputs'
},
// Cloning

Wyświetl plik

@ -61,7 +61,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy,
isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph,
TableFrameMorph, ColorSlotMorph, isSnapObject*/
modules.threads = '2017-October-12';
modules.threads = '2017-October-19';
var ThreadManager;
var Process;
@ -1662,17 +1662,17 @@ Process.prototype.doDeleteAttr = function (attrName) {
// experimental message passing primitives
Process.prototype.doTellTo = function (sprite, context) {
Process.prototype.doTellTo = function (sprite, context, args) {
this.doRun(
this.reportAttributeOf(context, sprite),
new List()
args
);
};
Process.prototype.reportAskFor = function (sprite, context) {
Process.prototype.reportAskFor = function (sprite, context, args) {
this.evaluate(
this.reportAttributeOf(context, sprite),
new List()
args
);
};