New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
find broadcast senders and receivers from block context menu #2675
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I totally love this feature, Bernat! This is excellent and the code is fine, don't be bewildered by my many comments, just a bunch of things to discuss, not having strong opinions on any of them. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these changes all look fine to me, thank you!
this.selector | ||
)) { | ||
menu.addLine(); | ||
menu.addItem( | ||
(this.selector === 'receiveMessage' ? | ||
(this.selector.indexOf('receive') === 0 ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha! I guess we need to remember this naming convention now :-)
if (((this.selector === 'doSend') && inputs[1] instanceof InputSlotMorph)) { | ||
receiverName = this.inputs()[1].evaluate(); | ||
} else if (this.selector.indexOf('receive') === 0) { | ||
receiverName = this.scriptTarget().name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clever!
Inspired by what Scratch 2.0 used to have, and of course by "senders / implementors" in The Language.