Jonas,

If I change

timer(1)  do
 draw_thermometer
end

 to:

draw_thermometer

I get an "undefined method 'draw_thermometer' for (Shoes::App..." error in the Console.

If I move the call to "draw_thermometer" to the bottom of the app, after all the method definitions, I get my thermometer and all is right with the world. :)

Things are more interesting/mysterious in the case of changing it from "timer(1) do" to "start do" and leaving it where it is -- it is blank when I start the app, but if I click on the app with my mouse, or resize it, or minimize/maximize it, or otherwise interact with it, then the thermometer pops into existence.

So you've got a solution if you want to abandon the start and timer events and just call "draw_thermometer" at the bottom of the Shoes.app block.

But maybe you've found a bug there in the fact that it doesn't seem to draw during the start event as it should.


On Jul 30, 2008, at 7:47 PM, Jonas Elfström wrote:

On Thu, Jul 31, 2008 at 1:24 AM, Seth Thomas Rasmussen
<[EMAIL PROTECTED]> wrote:
Some context from the code might be helpful.

Sorry, I'm not following you. The full source code is below and it
"works" as it is.
http://plea.se/me/shoes/kumlatemp/

If I change:

timer(1)  do
 draw_thermometer
end

to:

draw_thermometer

or:

start do
   draw_thermometer
end

No thermometer is drawn on application start even though the start
event is fired. Then after waiting the full five minutes it is drawn
by the:
every(300) do
     draw_thermometer
end

Still unclear?

Reply via email to