adric.net

bmrc
Login

Some notes as I hack through the RubyCocoaBook, in SnowLeopard

Structure of the book is strange but awesome, I think ... he deliberately has you redo things (even tells you) so that you get muscle memory, and as a way of easing the thing from tedious ObjC like verbosity into a more ruby-feeling code base.

And man he likes controllers. Has you refactor from one to three, and leave room for more in Chp 6.


With Z's help I reinstalled the XCode 3 templates ( link) and am back up and running with RubyCocoa in XCode. Hooray!

SnowLeopard InterfaceBuilder doesn't include a way to add outlets anymore. This is now done with class source (Controller.h,Controller.rb) in XCode. Z helped by giving me the RubyCocoa shortcuts needed:

	ib_outlets :log, :logWindow
	ib_action :chooseApp
and then I was able to proceed through Chapter Three with no additional trouble.
On 2009-09-04 18:27:40 UTC adric added:
done with page 64, "Don't Care Values"

On 2009-09-05 23:21:10 UTC adric added:
leaf: mucking through reading DNotes from the webapp, fascinating! bmrc p71

On 2009-09-06 03:28:50 UTC adric added:
Trouble with reading the notifications from the webapp are probably related to me getting too many notes, some of which have no userInfo!

thing is a NilClass

thing is a OSX::NSCFDictionary

2009-09-05 23:19:52.615 rubycocoa41234:80f MyController#next_number: NoMethodError: undefined method `to_ruby' for nil:NilClass

/Users/adric/Work/tril/rubycocoa/build/Debug/rubycocoa.app/Contents/Resources/MyController.rb:41:in `next_number' /Users/adric/Work/tril/rubycocoa/build/Debug/rubycocoa.app/Contents/Resources/rb_main.rb:22:in `NSApplicationMain' /Users/adric/Work/tril/rubycocoa/build/Debug/rubycocoa.app/Contents/Resources/rb_main.rb:22


userInfo: nil

userInfo: #<NSCFDictionary {#<NSCFString "views">=>#<NSCFNumber 63>, #<NSCFString "creations">=>#<NSCFNumber 1>, #<NSCFString "name">=>#<NSCFString "user">, #<NSCFString "id">=>#<NSCFNumber 1>}>

userInfo: #<NSCFDictionary {#<NSCFString "creations">=>#<NSCFNumber 1>, #<NSCFString "name">=>#<NSCFString "user">, #<NSCFString "id">=>#<NSCFNumber 1>, #<NSCFString "views">=>#<NSCFNumber 64>}>


On 2009-09-06 04:39:41 UTC adric added:
leaf: implemented as he did through the end of chap 4, bmrc p 75

On 2009-09-06 05:46:19 UTC adric added:
05:30:31 [0849f9ba24] working through 6.2, bmrc p 90 (user: adric tags: trunk)

05:44:54 [ccc273278f] *CURRENT* done with chp 6, fenestra is useless again, bmrc p 93 (user: adric tags: trunk)


On 2009-09-06 05:56:01 UTC adric added:
read through chp 7 and 8, somewhat bewildered. will have to start back in near there next time

On 2009-09-07 01:05:19 UTC adric added:
And then I read through the rest of the book, scratching my head and trying not to skim. He does throw together a pretty useful app, and does teach a lot of Cocoa, but man is it complicated.

Currently fighting with IB about some outlets to try and complete the simplest Cocoa app using RubyCocoa rather than that other language ...