hi
I have this code:
Shoes.app do
data = [1,2,3,4] # could be also more
data.each { |i|
edit_line ("foo"){ puts i}
}
end
when the value (foo) change in the edit_line field, I see in the terminal 1,2,3 or 4. But I need the value (.txt) from each edit_line field. How can I reference to it?
The problem is that data is dynam...
This is the current state of my code, and, although I get the desired effect, it's not working in the manner in which I need it to. Because the program is in an infinite loop, obviously it will produce both background gradients on top of one another constantly, and 10 circles with each loop, and quickly they overproduce themselves and s...
Ok, well I'm really pushing the bounds as to what shoes is for here, so I don't expect any miracles: is there a way to optionally run a shoes app without a gui?
The reason I'd like to do this is I'm creating a tool for use by "non computer people", as well as "computer people", who would rather just run the program as a command line to...
Question: Does anyone have an example of a "filter as you type" dropdown control using Shoes?
Examples: If you are looking for examples of what i am talking about, see these.
http://docs.jquery.com/Plugins/Autocomplete
http://stackoverflow.com/questions/706906/jquery-filter-dropdown-list-as-you-type
...
Is there any way to write Shoes application using IDE (NetBeans for example)?
I hadn't found this solution and I don't like running Shoes app, selecting files, run.
I'm sure code for packing Shoes and IDE code will be different (I hope in require directives only), but I'm intresting in possibility.
...
Is there a way to print slots/elements or an entire window under Shoes?
By this, I mean to direct output to the default system printer?
Thanks!
JP
...
I've got this piece of Shoes app:
flow :top => 10, :left => 10 do
flow :width => 0.3 do
para @board.deck.card
click do
if @board.source_pile
@board.source_pile = nil
@deck_border.hide
else
@board.source_pile = @board.deck
@deck_border = border yellow, :strokewidth => 2
end
...
I can't seem to install the twitter gem in my shoes app.
When I try...
Shoes.setup do
gem 'twitter'
end
require 'twitter'
I get
hoe requires RubyGems version >= 1.3.1
Is this a bug in Shoes or Hoe? Any ideas on a work-around?
...
Is there a way in Shoes to have text show up transparent?
I have:
Shoes.app{
para "Text", :stroke => rgb(1.0,0.0,0.0,0.5), :size => 100
}
But it's just showing up 100% red. I know opacity works for fill, does it also work for stroke?
(I am developing with Shoes Raisins Revision 1134 on Mac OS X 10.4.11)
Thanks in advance
...
I have created an application in shoes and the .dmg(.app) and .exe version work on there respective target systems, but how do I control the icon that is used for the executable files?
I just can't find any documentation on this. I plan on using many little helpful shoes applications and would like to have different icons to visually d...
In Shoes, I'd like to create a button that is initially hidden. I've tried passing :hidden => true as part of the button style, as well as calling @button.hide() after creating it, but it remains obstinately visible.
I've been able to work around this by not creating the button until I want it shown, but that requires checking to see if...
Once a button is created in Shoes, is it possible to change the text? I've tried modifying the :text key in the button [email protected] confirms the text is changed--but the button still shows the original text.
...
I don't understand why the width function is implemented on all elements if it returns 0 for non-zero width elements. The following returns 0 for me.
Shoes.app do
p = para "My width is: "
para p.width
end
Why is that? (app.width does not return 0)
...
Shoes.app do
flow do
file = "something with variable length"
para "Loading #{file}: "
progress :width => -300
end
end
As you can see from the code I am trying to display a progress bar that goes from the end of the text until the right edge of the application window.
When the text has a fixed length this solution works ...
I'm sure this has to do with the intricacies mentionned in Shoes > Manual > Rules but I just don't get it. If someone would care to explain why @var == nil in the following code ...
I thought I could use visit to switch between different views in my application but that won't work if I lose all state.
class MyShoe < Shoes
url '/', :i...
Despite reading what has been written on this here and here and here, I still can't get these lines to work for me:
Shoes.setup do
gem 'statemachine'
end
require 'rubygems'
require 'statemachine'
I have run "sudo gem install statemachine" successfully and copied the gem by hand to ~/.shoes/ to no avail so far.
I am using ruby 1.8 ...
Hi. I am trying to write a simple program that takes a rgb value and changes the background to that color using Shoes (Raisins revision 1134). Here is my code:
Shoes.app :title => "Show a Color" do
def convert_to_num(value)
# Splits string into numerical values
value.split(',').map { |num| num.to_i }
end
def t...
The (Ruby Shoes) packaging solution from Hacketyhack.net doesnt work.
Can anyone point me to an alternative?
...
I found cool article on Creating cross platform GUI's with IronRuby where someone re-created the Shoes DSL by _why the lucky stiff in IronRuby.
Awesome right!
So, I downloaded the IronRuby binaries and the code from the article and ran the following command:
c:\IronRuby\bin\ir hello_world.rb
But I get the following error:
:0:in ...
Shoes wraps it's own Ruby install, right?
I can't use Fiber which is a Ruby1.9 feature. And, I want to use a Fiber for creating a generator.
Here's my code (so you can make sure the problem isn't with my code):
class BrownianGenerator
def initialize
@x = 0
@fiber = Fiber.new do
loop do
@x = @x+rand;
F...