edit_line can handle enter key

A person complained on on the Shoes Mailing list that you can’t tell when the enter key is pressed in an edit_line control and it would be helpful to him if it could. So KCerb opened Bug 860 on Shoes4. I remember struggling with that issue for some app I was trying to write in Shoes 3 few years ago. I decided to fix it for Shoes 3.2.15 even though the Shoes4 folks put it off until a future release of Shoes4.

This is the kind of Cowboy coding practices that irritates people. It means Shoes 3.2 has “new” features that Shoes4 doesn’t. That’s different from restoring Shoes 3 features that were never intended to be in Shoes 4 (like packaging and binary gems). This time, I moved the goal posts on them. That’s annoying.

You can find 3.2.15 with this enhancement on the downloads page. It’s not everything I intented for 3.2.15 and I still have to document the new feature here and in the Shoes Manual but the feature is in the download(s). Which are named ‘.install’ for Linux instead of ‘.run’.

Here is a simple test program
Shoes.app do
stack do
@el = edit_line do |e|
para e.text+"\n"
@el.finish = proc { |slf| para "enterkey #{slf.text}\n" }

1 thought on “edit_line can handle enter key

  1. Pingback: Shoes 3.2.15 | Walkabout Shoes

Leave a Reply

Your email address will not be published. Required fields are marked *