diff --git a/HISTORY.md b/HISTORY.md index 9fdc71d9..d70da439 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -4,6 +4,7 @@ * **Notable Changes:** * added "loadProjectXML" method to the api + * hyperized "atrribute OF sprite" reporter primitive in the sensing category * **Documentation Updates:** * API update for "loadProjectXML" @@ -11,6 +12,7 @@ * new dev version * api: new loadProjectXML() method * updated api documentation +* threads: hyperized "atrribute OF sprite" reporter primitive ## 6.3.6 * **Notable Changes:** diff --git a/snap.html b/snap.html index fd605a4f..48744531 100755 --- a/snap.html +++ b/snap.html @@ -9,7 +9,7 @@ - + diff --git a/src/threads.js b/src/threads.js index 163a4e54..c5652a5e 100644 --- a/src/threads.js +++ b/src/threads.js @@ -61,7 +61,7 @@ StageMorph, SpriteMorph, StagePrompterMorph, Note, modules, isString, copy, Map, isNil, WatcherMorph, List, ListWatcherMorph, alert, console, TableMorph, BLACK, TableFrameMorph, ColorSlotMorph, isSnapObject, newCanvas, Symbol, SVG_Costume*/ -modules.threads = '2020-November-20'; +modules.threads = '2020-November-21'; var ThreadManager; var Process; @@ -4777,6 +4777,19 @@ Process.prototype.reportDirectionTo = function (name) { }; Process.prototype.reportAttributeOf = function (attribute, name) { + // hyper-dyadic + // note: specifying strings in the left input only accesses + // sprite-local variables. Attributes such as "width", "direction" etc. + // can only be queried via the dropdown menu and are, therefore, not + // reachable as dyadic inputs + return this.hyperDyadic( + (att, obj) => this.reportBasicAttributeOf(att, obj), + attribute, + name + ); +}; + +Process.prototype.reportBasicAttributeOf = function (attribute, name) { var thisObj = this.blockReceiver(), thatObj, stage;