Laurent is right and and I think best would be for you to use a NSTimer.
def drawWord
if !next_word
self.timer.invalidate
return
end
self.label.stringValue = next_word
self.setNeedsDisplay true
end
def next_word
...
end
self.timer = NSTimer.scheduledTimerWithTimeInterval( 1/20.
Hi,
It doesn't work because you're (probably) blocking the main thread,
which is responsible for drawing. What you want to do instead is
scheduling a timer inside the main run loop. Look at the NSTimer
class. Also, don't forget to force the view to be redrawn, by using
the setNeedsDisplay: method.
Thanks Laurent:
You may want to remove the bad files from the daily download page.
Bob Rice
On May 24, 2011, at 4:51 PM, Laurent Sansonetti wrote:
> Hi Bob,
>
> https://github.com/MacRuby/MacRuby/commit/68ac3fcaf1041ef9b25fb3bc940a47f41505b7e5
> happened. This fixes bugs but also introduces
I have a label that I have set to blank, and after a user clicks 'go' I
generate a random word or number and use:
self.label.stringValue = "some_word"
to update the view.
However, I would like to show 200 or so random words in quick succession before
the final one is shown - just because it's
Hi Bob,
https://github.com/MacRuby/MacRuby/commit/68ac3fcaf1041ef9b25fb3bc940a47f41505b7e5
happened. This fixes bugs but also introduces others. We have tickets covering
the new bugs and Kouji-san is working on them.
https://www.macruby.org/trac/ticket/1292
https://www.macruby.org/trac/ticket/
Just a quick note to say I've got the background image working - it was as
simple as dragging it from the media drawer (after being copied to the
resources folder) duh!
On 24 May 2011, at 16:46, az...@gmx.net wrote:
> Hi All - I'm new to MacRuby so please be gentle!
>
> I am trying to add a b
Hi All - I'm new to MacRuby so please be gentle!
I am trying to add a background image to my app. I drag an 'image view' over to
the window, but none of the options in any of the utilities drawers allows me
to specify an image (which is what seems I need to do - according to various
youtube vid
Hi Fans:
What changed on 5/19/2011?
I haven't been able to use the nightly builds since 5/18/2011. Constant
definitions stopped working and I get an uninitialized constant xxx (NameError)
message wherever my code tries to reference a constant defined in the same
class.
Thanks,
Bob Rice
_