On 13 Jan 2006, at 9:40, Tim Burks wrote:
>
> I'm working on some documentation of various aspects of RubyCocoa,
> beginning with an introduction. I've put the introduction online at
> http://www.rubycocoa.com and would welcome your comments and review.
Hi Tim,
I've had a quick read through - it looks very good. I think this will
be a valuable resource for the community.
I have a few nit-picky comments below - feel free to ignore me :)
> irb(main):002:0> sound = OSX::NSSound.soundNamed "Submarine"
People who have installed a tryout of Photoshop 7 (and possibly other
Adobe products of that era) will have a corrupt Submarine.aiff - I
just tried that example and I heard most of the sound then a chirp of
noise at the end. Possibly worth choosing a different sound just so
people aren't put off :)
> i = i.intValue() if i.class != Fixnum
A couple of things
* having empty brackets doesn't seem very ruby-like - i.intValue
* 'i === Numeric' rather than 'i.class != Fixnum'
* instances of NSNumber will support to_i (see to_i method in
oc_wrapper.rb),
so you could do 'return i.to_i + j.to_i'
> OSX::ns_import :Client
I prefer OSX.ns_import (I like to think of methods with a dot), and
use :: for constants.
Cheers,
Jonathan
|