raspberrypi / scratch

Scratch releases
79 stars 21 forks source link

Script starting is complex and inefficient #49

Open timrowledge opened 9 years ago

timrowledge commented 9 years ago

Complex mechanism for firing up scripts. Events with string names are passed around and strings compared (sigh) Lots of stupid isKindOf: nonsense to find relevant tiles to check for scripts.

See ScratchStageMorph>broadcastEventNamed:with:

ScratchSpriteMorph>eventReceived: :-(

heppg commented 9 years ago

Side remark: I never looked in detail to scratch sources, but there is a feature I discovered recently: event sending can use computed event names, pls see example. a_1 And 'outside world' can send in events, which are not enumerated by nature. This feature could explain some string compare on event names. Usage of variable names is not possible to the receiver side. This feature is useful for

timrowledge commented 9 years ago

That is rather cool.