Simple CocoaRuby tutorial

Discussion in 'Mac Programming' started by Luveno, Jul 17, 2008.

  1. Luveno macrumors member

    Luveno

    Joined:
    May 12, 2006
    Location:
    Nova Scotia, Canada
    #1
    Last night I recorded a simple Ruby/Cocoa screencast showing how to build a "Hello World" type application with RubyCocoa. I'm not the greatest narrator, so you'll have to suffer through multiple "aahhhhh ummm" type moments. I've only really started digging into cocoa this past week, and only lightly, so hopefully things I state are correct. Feel free to let me know if i'm wrong about anything :)

    http://warren.mesozen.com/2008/07/16/ruby-cocoa-tutorial/
     
  2. ergdegdeg Moderator emeritus

    ergdegdeg

    Joined:
    Oct 13, 2007
    #2
    This is really good :)
    I know a little Ruby and RoR and I was thinking about looking into RubyCocoa but haven't found a good starting point.

    Do you plan on doing any further tutorials?
     
  3. mainstreetmark macrumors 68020

    mainstreetmark

    Joined:
    May 7, 2003
    Location:
    Saint Augustine, FL
    #3
    Yeah, I've been looking for a Getting Started tut on this stuff. I haven't messed with IB for a few years, and that knowledge didn't stick.

    Maybe I'll get more into it and write a iPhone app (with objc, though I guess).

    Make more!
     
  4. Luveno thread starter macrumors member

    Luveno

    Joined:
    May 12, 2006
    Location:
    Nova Scotia, Canada
    #4
    I'll likely make a few more of these as I get a little deeper into cocoa. My goal is to be able to effectively write Objective C for use with cocoa, but every time i've tried to learn both ObjC and Cocoa at the same time, I turn away before any real progress is made. I figure with ruby (a language I already know) I can just learn to work with cocoa, and then start swapping out ruby code for ObjC. Not that any of that is relevant to "doing more videos" or anything, but it's some background.

    That being said, I'd like to do a video that includes a few cocoa controls or maybe uses CoreData. If you can think of anything you'd like to see, it won't hurt me to learn how to do it, to make a video :)
     
  5. HiRez macrumors 603

    HiRez

    Joined:
    Jan 6, 2004
    Location:
    Western US
    #5
    It's not bad, even the narration is pretty good and you didn't waste much time. My only criticism would be it's like 85% through the video before you actually write any Ruby code, so it's more like an Interface Builder tutorial than anything.

    Also remember if you hold down the Control key and scroll vertically in Leopard, it will zoom the screen in and out, which can be useful for highlighting things on the screen in demos if you don't want to make the movie a giant size. Although I'm not sure what you're using to record with, so those zooms might not be visible in the movie.
     
  6. KD7IWP macrumors 6502a

    KD7IWP

    Joined:
    Mar 8, 2004
    Location:
    American living in Canada
    #6
    Great tutorial! I haven't dappled in Interface Builder yet, so I thought it was great. I wouldn't mind a higher resolution, but your performance is great.
     
  7. Luveno thread starter macrumors member

    Luveno

    Joined:
    May 12, 2006
    Location:
    Nova Scotia, Canada
    #7
    I was using screenflow to record the video on an external 1920x1200 display. Some things zoom in with decent visibility, but other things are still too "small" to properly see. I may have another go at it, but lower my resolution so things get more screenspace.
     
  8. Mac Player macrumors regular

    Joined:
    Jan 19, 2006
    #8
    You can also write the class file automatically from IB. File -> Write Class Files -> Select Ruby
     
  9. dhjdhj macrumors newbie

    Joined:
    Sep 3, 2008
    #9
    First, thanks so much for taking the time to do this --- I've wanted to find an easy way to do quick/dirty GUI apps on the Mac without having to become an Objective C expert. Coming from Delphi in the Windows world, I really wanted to avoid going back to ANY variant of C :)

    I ran into a slight discrepancy when I tried to follow your video however. I found that after I created a new action, I wasn't able to change the name. Everytime I tried to edit the action name, my machine just beeped, even though the field was open for editing.
    I quit the entire program and restarted and then found I could in fact edit that field ---- so I'm wondering if this is just a bug in Interface Builder (I'm running 3.1)

    Also, I'm wondering how complete are these ruby cocoa interfaces? Will I find that I can do some trivial stuff but as soon as I try to do something sophisticated, there will be stuff that's not yet implemented, requiring me to spend a lot of time doing workarounds?

    D

     

Share This Page