Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I reload a running Shoes app after making source code changes?

Tags:

ruby

shoes

I'd like to start tinkering around with Shoes. There is one thing I can't figure out. How do I reload a running Shoes application after saving changes to the source code? I've already found the hotkeys for opening the Help, Console, and a new app.

To me it seems odd that the developer would be forced to close and restart a Shoes app each time a change is made. For a development environment that prides itself on being web-like, where is the corresponding "F5 key"?

Maybe I'm missing something or looking in the wrong place.

like image 249
Chad Braun-Duin Avatar asked Jan 04 '09 00:01

Chad Braun-Duin


1 Answers

There is no such shortcut at present. The documentation only mentions the three shortcuts to which you allude (alt+slash for console, alt+question for help, and alt+period for new app), and indeed the code only contains those shortcuts. Indeed, shoes/app.c has the following lines:

shoes_code
shoes_app_keypress(shoes_app *app, VALUE key)
{
  if (key == symAltSlash)
    rb_eval_string("Shoes.show_log");
  else if (key == symAltQuest)
    rb_eval_string("Shoes.show_manual");
  else if (key == symAltDot)
    rb_eval_string("Shoes.show_selector");
  else
    shoes_canvas_send_keypress(app->canvas, key);
  return SHOES_OK;
}

In other words, the three known shortcuts are trapped and treated specially, while any other keypress is sent to the app in question.

However, it may be possible to write your own "wrapper" that accomplishes your desired task.

like image 119
A. Rex Avatar answered Oct 20 '22 00:10

A. Rex