SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Downloaden Sie, um offline zu lesen
Ruby meets Cocoa
          Eloy Duran
Online
http://superalloy.nl/slides/ruby_meets_cocoa.pdf
Who is this guy?!
class EloyDuran < HomoSapiensObject

  attr_reader http://superalloy.nl/blog
  attr_writer e.duran@superalloy.nl

  def self.rubycocoa_os_stuff
    { :qtkit => 'Back in the day, when it was impossible to access C functions provided with a
                 framework from the Ruby side of the RubyCocoa bridge. I had written a wrapper
                 for QTKit which implemented all those functions.',

        :bridge_doc => 'A tool that ships with RubyCocoa which parses the Apple Objective-C
                        HTML reference files and transforms the Objective-C methods to the way
                        that calling is done from Ruby. The outputted ruby source files are then
                        passed to rdoc which creates HTML and ri documentation.',

        :ActiveRecordBindingsSupport => 'A set of Cocoa subclasses, included with RubyCocoa,
                                         which try to be the glue between Cocoa Bindings and
                                         ActiveRecord. Allowing you to create a CoreData like
                                         application, but instead using ActiveRecord as a backend.' }
  end

  def self.recent_super_secret_commercial_project
    quot;Can't say much about it, but basically it's a platform consisting of a server and clients,
    which handle the distribution of media files used in narrowcasting. The server is a Rails
    application with a Flex frontend to add media files to playlists. The clients are mac mini's
    that communicate with the server to see what they need to display and then start the transfer
    via the bittorrent protocol. The clients also run a application which displays the media
    files when needed. This player is created with RubyCocoa.quot;
  end
end
What is this Cocoa thing?
•   Cocoa is Apple’s native object-orientated programming
    environment for Mac OS X, written in Objective-C.

•   It’s derived from the NeXTSTEP and OPENSTEP programming
    environments developed by NeXT in the late 80’s.
    This is still visible in the prefix of all the class names, which is the
    acronym “NS” (for NeXTSTEP): NSString, NSArray etc.

•   It is a collection of frameworks, most notably:

    •   Foundation Kit / Foundation: not tied to the GUI
        eg: string manipulations.

    •   Application Kit / AppKit: to interact with the GUI
        eg: buttons, text fields.
Objective-C

•   Created by Brad Cox and Tom Love in the early 80’s,
    influenced heavily by Smalltalk.

•   Object-oriented programming language.

•   A strict superset of C, which means that any C code can be
    compiled by an Objective-C compiler.

•   Most of the syntax is inherited from C, the object-orientated
    syntax was added to allow Smalltalk-style messaging.

•   Like C, lots of semi-colons....
Objective-C example
                 Let’s say we have an instance of a class,
            which implements the following instance method:

       // An instance method called sayMessage:toPerson:
       - (void)sayMessage:(NSString)msg toPerson:(NSString)person
       {
           NSLog(@”%@ %@!”, msg, person);
       }

   When we pass the instance the sayMessage:toPerson message,
        a line will be printed to the console by NSLog()

[theInstance sayMessage:@”Hello” toPerson:@”World”]; //=> “Hello World!”
The most important thing
about Objective-C to me....
I’m a total (Obj-)C noob!
          by choice...
So, I need another solution
 to make use of Cocoa’s
      excellent facilities.
RubyCocoa
RubyCocoa History
•   Late 2001: Started by Hisakuni Fujimoto. Release 0.1 - 0.4

•   2002 - 2006: Release 0.5. More committers joined:
    Chris Thomas, Kimura Wataru, Jonathan Paisley, Tim Burks.

•   2006-05: Laurent Sansonetti (Apple inc) joins the committers list
    in order to make RubyCocoa a first class citizen among the
    programming languages supported in Mac OS X10.5 (leopard).
    Most notable is the addition of Libffi/BridgeSupport.

•   2006-11: I joined the committers list to add BridgeDoc.

•   2006-12: First preview (0.9) of the Apple branch was released.

•   2007-01: Second preview (0.10) was released.

•   2007-05: Third preview (0.11) and now officially the current
    stable release was released.
What is RubyCocoa?
•   It is a real bridge between the Ruby & Objective-C programming
    languages. Which means it isn’t limited to a predefined set of
    Cocoa frameworks.

•   It works by creating a Ruby proxy class for a Objective-C class.
    The method calls are sent through the use of Libffi.
    Which also allows us to call C functions even though they aren’t
    methods on objects.

•   The classes are imported lazily.
    Meaning that RubyCocoa imports them only on demand.

•   BridgeSupport allows RubyCocoa to bridge other parts of a
    framework, like C structures, constants.

•   Because it’s a real bridge, it works both ways. Thus you can mix
    Ruby and Objective-C inside your app.
RubyCocoa example
      Let’s say we have an instance of a Objective-C class,
       which implements the following instance method:
     // An instance method called sayMessage:toPerson:
     - (void)sayMessage:(NSString)msg toPerson:(NSString)person

           Ruby doesn’t have named parameters (yet?),
so the selectors have to be translated in a way that we can use it:
# Traditional syntax
theInstance.sayMessage_toPerson_('Hello', 'World')
# Lazy traditional syntax
theInstance.sayMessage_toPerson('Hello', 'World')
# Alternative syntax
theInstance.objc_send(:sayMessage, 'Hello',
                        :toPerson, 'World')
Time for some action!


     The state of the art
      MailDemo sample

Let’s all pray uncle Murphy won’t act upon his law.....
             Or laugh, whichever you prefer.
Questions?
Readfood:
•Hisakuni Fujimoto: http://fobj.com/hisa/d
•Laurent Sansonetti: http://chopine.be/lrz/diary
•Me: http://superalloy.nl/blog
•RubyCocoa website/wiki: http://rubycocoa.sf.net
•Drop by in the irc channel (freenode): #ruby-osx
•MailingLists: http://rubycocoa.sf.net/GettingSupport
•RubyCocoa tutorials: http://rubycocoa.com
•Original MailDemo tutorial:
http://cocoadevcentral.com/articles/000080.php

•Unlimited coding inspiration: http://www.johnnyweb.fr

Weitere ähnliche Inhalte

Was ist angesagt?

HornetQ Presentation On JBoss World 2009
HornetQ Presentation On JBoss World 2009HornetQ Presentation On JBoss World 2009
HornetQ Presentation On JBoss World 2009
jarfield
 
Socket Programming using Java
Socket Programming using JavaSocket Programming using Java
Socket Programming using Java
Rahul Hada
 
Distributed Ruby and Rails
Distributed Ruby and RailsDistributed Ruby and Rails
Distributed Ruby and Rails
Wen-Tien Chang
 

Was ist angesagt? (20)

Mac ruby deployment
Mac ruby deploymentMac ruby deployment
Mac ruby deployment
 
Hijacking Ruby Syntax in Ruby (RubyConf 2018)
Hijacking Ruby Syntax in Ruby (RubyConf 2018)Hijacking Ruby Syntax in Ruby (RubyConf 2018)
Hijacking Ruby Syntax in Ruby (RubyConf 2018)
 
PHP and Node.js-Differences and Similarities
PHP and Node.js-Differences and SimilaritiesPHP and Node.js-Differences and Similarities
PHP and Node.js-Differences and Similarities
 
Fast and Reliable Swift APIs with gRPC
Fast and Reliable Swift APIs with gRPCFast and Reliable Swift APIs with gRPC
Fast and Reliable Swift APIs with gRPC
 
Difference between php and node
Difference between php and nodeDifference between php and node
Difference between php and node
 
How DSL works on Ruby
How DSL works on RubyHow DSL works on Ruby
How DSL works on Ruby
 
HornetQ Presentation On JBoss World 2009
HornetQ Presentation On JBoss World 2009HornetQ Presentation On JBoss World 2009
HornetQ Presentation On JBoss World 2009
 
Socket Programming using Java
Socket Programming using JavaSocket Programming using Java
Socket Programming using Java
 
Distributed Ruby and Rails
Distributed Ruby and RailsDistributed Ruby and Rails
Distributed Ruby and Rails
 
How to develop the Standard Libraries of Ruby?
How to develop the Standard Libraries of Ruby?How to develop the Standard Libraries of Ruby?
How to develop the Standard Libraries of Ruby?
 
Groovy & Grails
Groovy & GrailsGroovy & Grails
Groovy & Grails
 
692015 programming assignment 1 building a multi­threaded w
692015 programming assignment 1 building a multi­threaded w692015 programming assignment 1 building a multi­threaded w
692015 programming assignment 1 building a multi­threaded w
 
Mazda siv - web services
Mazda   siv - web servicesMazda   siv - web services
Mazda siv - web services
 
What Makes Objective C Dynamic?
What Makes Objective C Dynamic?What Makes Objective C Dynamic?
What Makes Objective C Dynamic?
 
20140918 ruby kaigi2014
20140918 ruby kaigi201420140918 ruby kaigi2014
20140918 ruby kaigi2014
 
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
State of the art: Server-Side JavaScript - WebWorkersCamp IV - Open World For...
 
RubyGems 3 & 4
RubyGems 3 & 4RubyGems 3 & 4
RubyGems 3 & 4
 
The details of CI/CD environment for Ruby
The details of CI/CD environment for RubyThe details of CI/CD environment for Ruby
The details of CI/CD environment for Ruby
 
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
 
Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1Ruby on Rails Training - Module 1
Ruby on Rails Training - Module 1
 

Ähnlich wie Ruby Meets Cocoa

Macruby& Hotcocoa presentation by Rich Kilmer
Macruby& Hotcocoa presentation by Rich KilmerMacruby& Hotcocoa presentation by Rich Kilmer
Macruby& Hotcocoa presentation by Rich Kilmer
Matt Aimonetti
 
MacRuby & HotCocoa
MacRuby & HotCocoaMacRuby & HotCocoa
MacRuby & HotCocoa
Thilo Utke
 
MacRuby & RubyMotion - Madridrb May 2012
MacRuby & RubyMotion - Madridrb May 2012MacRuby & RubyMotion - Madridrb May 2012
MacRuby & RubyMotion - Madridrb May 2012
Mark Villacampa
 

Ähnlich wie Ruby Meets Cocoa (20)

ruby-cocoa
ruby-cocoaruby-cocoa
ruby-cocoa
 
Macruby& Hotcocoa presentation by Rich Kilmer
Macruby& Hotcocoa presentation by Rich KilmerMacruby& Hotcocoa presentation by Rich Kilmer
Macruby& Hotcocoa presentation by Rich Kilmer
 
Ruby on Rails - An overview
Ruby on Rails -  An overviewRuby on Rails -  An overview
Ruby on Rails - An overview
 
Why Ruby?
Why Ruby? Why Ruby?
Why Ruby?
 
MacRuby, an introduction
MacRuby, an introductionMacRuby, an introduction
MacRuby, an introduction
 
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
차세대컴파일러, VM의미래: 애플 오픈소스 LLVM
 
From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...From development environments to production deployments with Docker, Compose,...
From development environments to production deployments with Docker, Compose,...
 
Ruby on Rails Presentation
Ruby on Rails PresentationRuby on Rails Presentation
Ruby on Rails Presentation
 
CC-Castle; The best Real-Time/Embedded/HighTech language EVER?
CC-Castle; The best Real-Time/Embedded/HighTech language EVER?CC-Castle; The best Real-Time/Embedded/HighTech language EVER?
CC-Castle; The best Real-Time/Embedded/HighTech language EVER?
 
IronRuby for the Rubyist
IronRuby for the RubyistIronRuby for the Rubyist
IronRuby for the Rubyist
 
Writing a Gem with native extensions
Writing a Gem with native extensionsWriting a Gem with native extensions
Writing a Gem with native extensions
 
Intro to Rack
Intro to RackIntro to Rack
Intro to Rack
 
MacRuby & HotCocoa
MacRuby & HotCocoaMacRuby & HotCocoa
MacRuby & HotCocoa
 
Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)
 
Docker 101
Docker 101 Docker 101
Docker 101
 
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other ThingsI Just Want to Run My Code: Waypoint, Nomad, and Other Things
I Just Want to Run My Code: Waypoint, Nomad, and Other Things
 
node.js: Javascript's in your backend
node.js: Javascript's in your backendnode.js: Javascript's in your backend
node.js: Javascript's in your backend
 
MacRuby & RubyMotion - Madridrb May 2012
MacRuby & RubyMotion - Madridrb May 2012MacRuby & RubyMotion - Madridrb May 2012
MacRuby & RubyMotion - Madridrb May 2012
 
Srgoc dotnet_new
Srgoc dotnet_newSrgoc dotnet_new
Srgoc dotnet_new
 
Phoenix for Rails Devs
Phoenix for Rails DevsPhoenix for Rails Devs
Phoenix for Rails Devs
 

Mehr von Robbert (7)

BDD & Rspec
BDD & Rspec BDD & Rspec
BDD & Rspec
 
A Ct Os Story
A Ct Os StoryA Ct Os Story
A Ct Os Story
 
Camping For The Rest Of Us
Camping For The Rest Of UsCamping For The Rest Of Us
Camping For The Rest Of Us
 
Betty Builder, Een GUI voor het maken en aanpassen van Rails models en migra...
Betty Builder,  Een GUI voor het maken en aanpassen van Rails models en migra...Betty Builder,  Een GUI voor het maken en aanpassen van Rails models en migra...
Betty Builder, Een GUI voor het maken en aanpassen van Rails models en migra...
 
ActiveResource & REST
ActiveResource & RESTActiveResource & REST
ActiveResource & REST
 
JRuby Rules
JRuby RulesJRuby Rules
JRuby Rules
 
Serving Up Your Rails App On A Mongrel Cluster
Serving Up Your Rails App On A Mongrel ClusterServing Up Your Rails App On A Mongrel Cluster
Serving Up Your Rails App On A Mongrel Cluster
 

Kürzlich hochgeladen

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Kürzlich hochgeladen (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

Ruby Meets Cocoa

  • 1. Ruby meets Cocoa Eloy Duran
  • 3. Who is this guy?! class EloyDuran < HomoSapiensObject attr_reader http://superalloy.nl/blog attr_writer e.duran@superalloy.nl def self.rubycocoa_os_stuff { :qtkit => 'Back in the day, when it was impossible to access C functions provided with a framework from the Ruby side of the RubyCocoa bridge. I had written a wrapper for QTKit which implemented all those functions.', :bridge_doc => 'A tool that ships with RubyCocoa which parses the Apple Objective-C HTML reference files and transforms the Objective-C methods to the way that calling is done from Ruby. The outputted ruby source files are then passed to rdoc which creates HTML and ri documentation.', :ActiveRecordBindingsSupport => 'A set of Cocoa subclasses, included with RubyCocoa, which try to be the glue between Cocoa Bindings and ActiveRecord. Allowing you to create a CoreData like application, but instead using ActiveRecord as a backend.' } end def self.recent_super_secret_commercial_project quot;Can't say much about it, but basically it's a platform consisting of a server and clients, which handle the distribution of media files used in narrowcasting. The server is a Rails application with a Flex frontend to add media files to playlists. The clients are mac mini's that communicate with the server to see what they need to display and then start the transfer via the bittorrent protocol. The clients also run a application which displays the media files when needed. This player is created with RubyCocoa.quot; end end
  • 4. What is this Cocoa thing? • Cocoa is Apple’s native object-orientated programming environment for Mac OS X, written in Objective-C. • It’s derived from the NeXTSTEP and OPENSTEP programming environments developed by NeXT in the late 80’s. This is still visible in the prefix of all the class names, which is the acronym “NS” (for NeXTSTEP): NSString, NSArray etc. • It is a collection of frameworks, most notably: • Foundation Kit / Foundation: not tied to the GUI eg: string manipulations. • Application Kit / AppKit: to interact with the GUI eg: buttons, text fields.
  • 5. Objective-C • Created by Brad Cox and Tom Love in the early 80’s, influenced heavily by Smalltalk. • Object-oriented programming language. • A strict superset of C, which means that any C code can be compiled by an Objective-C compiler. • Most of the syntax is inherited from C, the object-orientated syntax was added to allow Smalltalk-style messaging. • Like C, lots of semi-colons....
  • 6. Objective-C example Let’s say we have an instance of a class, which implements the following instance method: // An instance method called sayMessage:toPerson: - (void)sayMessage:(NSString)msg toPerson:(NSString)person { NSLog(@”%@ %@!”, msg, person); } When we pass the instance the sayMessage:toPerson message, a line will be printed to the console by NSLog() [theInstance sayMessage:@”Hello” toPerson:@”World”]; //=> “Hello World!”
  • 7. The most important thing about Objective-C to me....
  • 8. I’m a total (Obj-)C noob! by choice...
  • 9. So, I need another solution to make use of Cocoa’s excellent facilities.
  • 11. RubyCocoa History • Late 2001: Started by Hisakuni Fujimoto. Release 0.1 - 0.4 • 2002 - 2006: Release 0.5. More committers joined: Chris Thomas, Kimura Wataru, Jonathan Paisley, Tim Burks. • 2006-05: Laurent Sansonetti (Apple inc) joins the committers list in order to make RubyCocoa a first class citizen among the programming languages supported in Mac OS X10.5 (leopard). Most notable is the addition of Libffi/BridgeSupport. • 2006-11: I joined the committers list to add BridgeDoc. • 2006-12: First preview (0.9) of the Apple branch was released. • 2007-01: Second preview (0.10) was released. • 2007-05: Third preview (0.11) and now officially the current stable release was released.
  • 12. What is RubyCocoa? • It is a real bridge between the Ruby & Objective-C programming languages. Which means it isn’t limited to a predefined set of Cocoa frameworks. • It works by creating a Ruby proxy class for a Objective-C class. The method calls are sent through the use of Libffi. Which also allows us to call C functions even though they aren’t methods on objects. • The classes are imported lazily. Meaning that RubyCocoa imports them only on demand. • BridgeSupport allows RubyCocoa to bridge other parts of a framework, like C structures, constants. • Because it’s a real bridge, it works both ways. Thus you can mix Ruby and Objective-C inside your app.
  • 13. RubyCocoa example Let’s say we have an instance of a Objective-C class, which implements the following instance method: // An instance method called sayMessage:toPerson: - (void)sayMessage:(NSString)msg toPerson:(NSString)person Ruby doesn’t have named parameters (yet?), so the selectors have to be translated in a way that we can use it: # Traditional syntax theInstance.sayMessage_toPerson_('Hello', 'World') # Lazy traditional syntax theInstance.sayMessage_toPerson('Hello', 'World') # Alternative syntax theInstance.objc_send(:sayMessage, 'Hello', :toPerson, 'World')
  • 14. Time for some action! The state of the art MailDemo sample Let’s all pray uncle Murphy won’t act upon his law..... Or laugh, whichever you prefer.
  • 16. Readfood: •Hisakuni Fujimoto: http://fobj.com/hisa/d •Laurent Sansonetti: http://chopine.be/lrz/diary •Me: http://superalloy.nl/blog •RubyCocoa website/wiki: http://rubycocoa.sf.net •Drop by in the irc channel (freenode): #ruby-osx •MailingLists: http://rubycocoa.sf.net/GettingSupport •RubyCocoa tutorials: http://rubycocoa.com •Original MailDemo tutorial: http://cocoadevcentral.com/articles/000080.php •Unlimited coding inspiration: http://www.johnnyweb.fr