Comments for Fool's Ruby and Cocoa Workshop http://foolsworkshop.com/rubycocoa A weblog dedicated to development with RubyCocoa and MacRuby on OS X Sun, 07 Aug 2016 12:20:08 +0000 http://wordpress.org/?v=2.5.1 Comment on MacRuby Tutorial by tp http://foolsworkshop.com/rubycocoa/2008/06/macruby-tutorial/#comment-32 tp Sun, 28 Jun 2009 11:31:49 +0000 http://foolsworkshop.com/rubycocoa/?p=10#comment-32 This is not the MacRuby language, it's RubyCocoa. In the MacRuby language you don't need to add ' < NSWindow Controller' and instead of 'ib_outlet' you use 'attr_writer' and 'attr_accessor' You also don't use 'ib_action :clicked ...' but 'def clicked(sender)' This is not the MacRuby language, it’s RubyCocoa.

In the MacRuby language you don’t need to add ‘ < NSWindow Controller’ and instead of ‘ib_outlet’ you use ‘attr_writer’ and ‘attr_accessor’
You also don’t use ‘ib_action :clicked …’ but ‘def clicked(sender)’

]]>
Comment on Adding a Check Updates Feature for RubyCocoa and MacRuby by Johanlunds@gmail.com http://foolsworkshop.com/rubycocoa/2008/06/adding-a-check-updates-feature-for-rubycocoa-and-macruby/#comment-31 Johanlunds@gmail.com Wed, 21 Jan 2009 17:04:20 +0000 http://foolsworkshop.com/rubycocoa/?p=11#comment-31 1.5b2 fixes the GC problem I think (haven't tested it). See http://andymatuschak.org/articles/2008/06/29/sparkle-15b2/ Quote: "Made the dual-mode build configuration actually use the .xcconfig which builds it with GC support. (oops!)" 1.5b2 fixes the GC problem I think (haven’t tested it). See http://andymatuschak.org/articles/2008/06/29/sparkle-15b2/

Quote: “Made the dual-mode build configuration actually use the .xcconfig which builds it with GC support. (oops!)”

]]>
Comment on MacRuby Tutorial by Ratchet http://foolsworkshop.com/rubycocoa/2008/06/macruby-tutorial/#comment-30 Ratchet Sun, 16 Nov 2008 09:03:30 +0000 http://foolsworkshop.com/rubycocoa/?p=10#comment-30 I always got the message "`ClickTestButton': undefined method `stringValue' for nil:NilClass (NoMethodError)" What am I doing wrong? I always got the message “`ClickTestButton’: undefined method `stringValue’ for nil:NilClass (NoMethodError)”
What am I doing wrong?

]]>
Comment on MacRuby Random Number Generator Tutorial by Michael Leung http://foolsworkshop.com/rubycocoa/2008/06/macruby-random-number-generator-tutorial/#comment-29 Michael Leung Fri, 31 Oct 2008 21:15:11 +0000 http://foolsworkshop.com/rubycocoa/?p=15#comment-29 These MacRuby screencasts are awesome. Keep 'em coming! These MacRuby screencasts are awesome. Keep ‘em coming!

]]>
Comment on MacRuby Random Number Generator Tutorial by K. M. Lawson http://foolsworkshop.com/rubycocoa/2008/06/macruby-random-number-generator-tutorial/#comment-28 K. M. Lawson Sun, 26 Oct 2008 09:02:11 +0000 http://foolsworkshop.com/rubycocoa/?p=15#comment-28 Hello Fred, I am not sure why I did that. I think NSObject is what I would I have done if I was thinking it through. Thanks! Hello Fred, I am not sure why I did that. I think NSObject is what I would I have done if I was thinking it through.

Thanks!

]]>
Comment on MacRuby Random Number Generator Tutorial by fred b. http://foolsworkshop.com/rubycocoa/2008/06/macruby-random-number-generator-tutorial/#comment-27 fred b. Sat, 25 Oct 2008 14:22:32 +0000 http://foolsworkshop.com/rubycocoa/?p=15#comment-27 Hi Konrad, many thx for your excellent idea to follow Aaron Hillegass book, I am trying to learn in parallel Cocoa/Obj-c and MacRuby. Any reason why you chose to subclass MyController from NSWindowController? I tried to stick to Aaron example, and subclassed a Foo class from NSObject, and also does the job: class Foo < NSObject attr_accessor :messages def seed(sender) t = Time.now srand t.to_i @messages.stringValue="Generated seed using time: "+t.to_s end def generate(sender) @messages.stringValue=(rand(100)+1).to_s end def awakeFromNib @messages.stringValue="Click seed first..." end end Hi Konrad, many thx for your excellent idea to follow Aaron Hillegass book, I am trying to learn in parallel Cocoa/Obj-c and MacRuby. Any reason why you chose to subclass MyController from NSWindowController? I tried to stick to Aaron example, and subclassed a Foo class from NSObject, and also does the job:

class Foo < NSObject
attr_accessor :messages
def seed(sender)
t = Time.now
srand t.to_i
@messages.stringValue=”Generated seed using time: “+t.to_s
end
def generate(sender)
@messages.stringValue=(rand(100)+1).to_s
end
def awakeFromNib @messages.stringValue=”Click seed first…”
end
end

]]>
Comment on A Few Other RubyCocoa Tutorials by Ted http://foolsworkshop.com/rubycocoa/2008/06/a-few-other-rubycocoa-tutorials/#comment-26 Ted Tue, 21 Oct 2008 08:24:55 +0000 http://foolsworkshop.com/rubycocoa/?p=16#comment-26 Great site, really useful.. Could someone tell me which is best to use out of MacRuby or RubyCocoa, or are they the same thing? Many thanks... Great site, really useful.. Could someone tell me which is best to use out of MacRuby or RubyCocoa, or are they the same thing? Many thanks…

]]>
Comment on MacRuby Tutorial by Eric Berry http://foolsworkshop.com/rubycocoa/2008/06/macruby-tutorial/#comment-25 Eric Berry Thu, 16 Oct 2008 21:09:56 +0000 http://foolsworkshop.com/rubycocoa/?p=10#comment-25 Keep them coming. This is a great screencast, and there is definitely a shortage of them. Keep them coming. This is a great screencast, and there is definitely a shortage of them.

]]>
Comment on MacRuby Tutorial by Toby http://foolsworkshop.com/rubycocoa/2008/06/macruby-tutorial/#comment-24 Toby Mon, 28 Jul 2008 22:26:26 +0000 http://foolsworkshop.com/rubycocoa/?p=10#comment-24 This is really sweet. So nice to have something to help with those first few moments with InterfaceBuilder. Thank you. This is really sweet. So nice to have something to help with those first few moments with InterfaceBuilder. Thank you.

]]>
Comment on Missing MacRuby Project Template by Ryan Richards http://foolsworkshop.com/rubycocoa/2008/06/missing-macruby-project-template/#comment-23 Ryan Richards Wed, 16 Jul 2008 18:25:21 +0000 http://foolsworkshop.com/rubycocoa/?p=8#comment-23 Thanks! was wondering about this myself. Thanks! was wondering about this myself.

]]>