mit-cml / appinventor-sources

MIT App Inventor Public Open Source
http://appinventor.mit.edu/appinventor-sources/
Apache License 2.0
1.47k stars 2.06k forks source link

Procedure Flydown #2246

Open BeksOmega opened 4 years ago

BeksOmega commented 4 years ago

Describe the desired feature

Procedure names would act as a flydown.

procedures_defnoreturn

When the flydown is opened it would contain a call block associated with the procedure.

Give an example of how this feature would be used

1) Drag a procedure block from the flyout. 2) Program the procedure. 3) Hover over the procedure name. 4) A flydown containing the caller block would appear. 5) Drag the caller block from the flydown.

Why doesn't the current App Inventor system address this use case?

This is just an addition for convenience. Currently you can only drag procedure blocks from the flyout.

Why is this feature beneficial to App Inventor's educational mission?

It would help students connect the idea of the caller and the procedure together. It may also make coding faster :D

Additional info

See here for the original feature request.

ewpatton commented 4 years ago

I think this is fine to implement, but I don't think it will be as useful as it would first seem.

Flydowns really work for when you're grabbing the variable in a visually proximate location, such as the event parameters or a local lexical variable declaration. Given that procedures can be called from anywhere in the workspace, being able to mouse over the procedure name is of limited utility if it's not even on screen. Typeblocking or getting the call block from the procedure drawer is probably faster in most cases (I have no empirical data for this, it's just my gut intuition). It might be useful for the first call or two, but as program complexity increases my guess is most people won't end up using this. However, given the fact that procedure use is so low as discussed by @fturbak and others, my hope is that maybe this could improve use of procedures.