hpi-swa / sandblocks

A projectional editor for Squeak/Smalltalk.
MIT License
35 stars 3 forks source link

Promote Insert Cursor Positions (Cannot type into auto-created method in new Browser) #73

Open LinqLover opened 2 years ago

LinqLover commented 2 years ago

sandblocks-bug-cannot-type-into-autocreated-method

LinqLover commented 2 years ago

Proposal by the way: Provide a command on every message send block decorated with "message not understood" or "unknown selector" that creates the method later as well even if the sending method has already been accepted.

tom95 commented 2 years ago

Just noting for the eventual implementation: the desired behavior here would be that the cursor is modified to first hit the insert position inside of the block body, rather than selecting it. At the moment, we never hit insert positions by default when moving vertically, only text and select positions.

An alternative implementation may insert an "unknown" while creating the method, as is done with methods at the moment, but this is behavior we would prefer to migrate to better handling insert positions in the future.

As a temporary workaround you can simply press return on any block in the method and it will go and find the nearest place to insert a statement into :)

LinqLover commented 2 years ago

As a temporary workaround you can simply press return on any block in the method and it will go and find the nearest place to insert a statement into :)

You mean Enter, not the "return caret" ^, right? Okay :)

tom95 commented 2 years ago

One open question in this regard is how it would interplay with inputNextUnknown/. At the moment, since unknowns are placed deliberately, will usually move you to a very convenient location to continue input. Once we remove those unknowns, we're left with a swaths of possible insert positions, most of which with little relevance.

Example: type in method selector, press to move to body. Currently, this moves to the unknown placed in the body. With the new design it may move to the insert position at the end of the method's selector, then to the temporaries, and then to the statements.

One idea may be to have insert positions declare that they are "tab targets" or similar, which e.g. an empty array or an empty block body may set.