# Shoes questions

**URL:** <https://www.ruby-forum.com/t/shoes-questions/122176>\
**Category:** Ruby\
**Created:** [December 5, 2007, 8:08am UTC](https://www.ruby-forum.com/t/shoes-questions/122176 "2007-12-05T08:08:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dust](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c2a13f/32.png) [@dust](https://www.ruby-forum.com/u/dust)\
**Post date:** [December 5, 2007, 8:08am UTC](https://www.ruby-forum.com/t/shoes-questions/122176/1 "2007-12-05T08:08:21Z")

</div>

Alright i know that its possible to “getkeys” and set commands for the  
SHOE app. but i can’t get it to work i want to replace a button with  
somthing like keypress :enter ::  
button(“Submit Answer”) do #this is where the \*enter would go  
if @answerp.text.to\_i == answer  
answerbox.clear { para “correct” }  
wrongbox.clear  
@answerp.replace edit\_line  
in addition, can someone yell me why this doesn’t work, i was  
attempting to clear my edit box…  
button(“Submit Answer”) do  
if @answerp.text.to\_i == answer  
answerbox.clear { para “correct” }  
wrongbox.clear  
@answerp.replace edit\_line  
.clear doesnt work either, i get an error and it just creates another  
box.???  
Thanks for any help

---

<div class="post-metadata">

**Author:** ![dust](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/c2a13f/32.png) [@dust](https://www.ruby-forum.com/u/dust)\
**Post date:** [December 5, 2007, 9:39am UTC](https://www.ruby-forum.com/t/shoes-questions/122176/2 "2007-12-05T09:39:04Z")

</div>

On Wed, Dec 05, 2007 at 04:08:20PM +0900, Erik B. wrote:

> Alright i know that its possible to “getkeys” and set commands for the  
> SHOE app. but i can’t get it to work i want to replace a button with  
> somthing like keypress :enter ::

Oh, Erik, if you want to join the Shoes mailing list, we’ll take  
good care of you. Send a message To: removed\_email\_address@domain.invalid  
and CC: removed\_email\_address@domain.invalid and you’ll be subscribed.

> in addition, can someone yell me why this doesn’t work, i was  
> attempting to clear my edit box…  
> button(“Submit Answer”) do  
> if @answerp.text.to\_i == answer  
> answerbox.clear { para “correct” }  
> wrongbox.clear  
> @answerp.replace edit\_line

A paragraph can’t be replaced with an edit\_line yet. And you  
probably want to use: answerbox.text = “correct” … Depends on what  
answerbox is.

Post your entire program to the Shoes list and we’ll all race to  
find an answer. As long as you keep in mind that nobody knows  
Shoes, you’ll be just fine.

\_why
