shoes

How do I change the icon of my Shoes App?

与世无争的帅哥 提交于 2019-12-21 18:06:21
问题 I was wondering if it was possible to change the my Shoes app's icon? I imagine its style-oriented, but I haven't been able to find anything on it. Is this possible? 回答1: I don't believe this is possible from within Shoes. This is based on extensive searching, both online and in the source code. However, there are a couple things external to Shoes that work. One is to simply change the file #{DIR}/static/shoes-icon.png , which is where the runtime pulls its icon from. The other is to change

Creating Ruby applications for Windows

别说谁变了你拦得住时间么 提交于 2019-12-21 09:27:00
问题 I want to develop a Windows application. Honestly I care little about cross-platforms for now (but still would be good) I want to use Ruby, since it has quite a simple syntax and is so.. well, simple and easy to learn. My application is like a "game level creator", where you can design your own level and then run it with another application which is a "game level player" by reading the project file created by the creator app. You get the idea. Now, I got a new PC and is completely clean.

How do I get content from a website using Ruby / Rails?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-21 05:37:30
问题 I want to copy some specific content from a website using ruby/rails. The content I need is inside a marquee html tag, divided by divs. How can I get access to this content using ruby? To be more precise - I want to use some kind of ruby gui (Preferably shoes). How do I do it? 回答1: This isn't really a Rails question. It's something you'd do using Ruby, then possibly display using Rails, or Sinatra or Padrino - pick your poison. There are several different HTTP clients you can use: Open-URI

My classes can't use Shoes methods like para

痴心易碎 提交于 2019-12-20 05:18:04
问题 Tldr: how do I 'include Shoes methods' into the Array class and classes ive created, with minimal code, without totally restructuring everything? I've written a functioning program in Ruby, and now I want to make a Shoes app from it. I'm having the problem described at the beginning of the manual - Shoes.app is a sort of block in itself, so self always refers to it, and Shoes methods like "para" aren't necessarily going to be available everywhere the way "puts" is in Ruby. But I'm not smart

So transparent that i can't catch it…Using Rghost to emulate ghostscript command as would be on virtual printer

假装没事ソ 提交于 2019-12-20 03:50:28
问题 as a ruby newb i've been on a little ghost hunt that you might be of some help I read a lot and was told the best way to get these sneaky fellows was using a script : ghostscript. I'm trying to execute the ghostscript command that i run in a virtual printer, but in the context of a ruby (shoes) file : My command is : C:\Programas\gs\gs9.05\bin\gswin64c.exe -IC:\Programas\gs\gs9.05\lib;C:\Programas\gs\fonts -sDEVICE=pdfwrite -r300 -dNOPAUSE -dSAFER -sPAPERSIZE=a4 -sOutputFile=c:\tempRep\temp

Shoes GUI toolkit per pixel manipulation possible?

て烟熏妆下的殇ゞ 提交于 2019-12-13 02:17:01
问题 Is there any method for per pixel manipulation in the Shoes GUI toolkit? The manual is a tad bit suboptimal. 回答1: Yep, there is. Most elements accept a :top and :right that let you pick an offset per pixel, and lots of the drawing and shape stuff is per-pixel as well. 来源: https://stackoverflow.com/questions/4981810/shoes-gui-toolkit-per-pixel-manipulation-possible

On Ubuntu does Shoes require Ruby1.8 or Ruby1.9?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 23:30:19
问题 I have only installed Ruby1.9 on my machine. Have some kind of problems with the programs I am trying to write using Shoes. Am wondering if this is a version issue. I am trying to do some stuff over ssl. 回答1: Shoes comes with its own Ruby version embedded in the script you download. It is completely self-contained as far as I can tell. 回答2: I'm don't know what is "Shoes" but i found this: https://launchpad.net/ubuntu/+source/shoes according to that "shoes (0.r396-5)" Depend on "rubygems1.8"

How to get a stopwatch program running?

帅比萌擦擦* 提交于 2019-12-12 23:25:40
问题 I borrowed some code from a site, but I don't know how to get it to display. class Stopwatch def start @accumulated = 0 unless @accumulated @elapsed = 0 @start = Time.now @mybutton.configure('text' => 'Stop') @mybutton.command { stop } @timer.start end def stop @mybutton.configure('text' => 'Start') @mybutton.command { start } @timer.stop @accumulated += @elapsed end def reset stop @accumulated, @elapsed = 0, 0 @mylabel.configure('text' => '00:00:00.00.000') end def tick @elapsed = Time.now -

How to call Shoes methods from inside an instance method?

不打扰是莪最后的温柔 提交于 2019-12-12 18:17:33
问题 I am trying to extend a Ruby application I've already written to use Shoes. I have a class that I've already written and I want to be able to use a GUI with that class. That is, I want my class to have something like this: class MyClass def draw # draw something using Shoes end end Another method inside MyClass will call draw() when it wants to draw something. I've tried doing this in several ways and none of them seem to work. I could wrap the entire class in a Shoes app. Let's say I want to

list_box won't use default value on startup - Shoes.

谁说我不能喝 提交于 2019-12-11 08:59:06
问题 I'm trying to use a list_box to select from different types of conversions. When I start the program and enter a number it does nothing, but if I click the next item in the list_box it works fine. This makes me think my method is not getting it's value from the list_box. Here's the code: Shoes.app :title=> 'Temperature Converter', :width => 200, :height => 200 do def convert(temp, unit='C') if unit == "C" (temp.to_i * 9.0 / 5.0) + 32.0 elsif unit == "F" "Fail" end end list_box :items => ["C",