[macruby-changes] [2708] MacRubyWebsite/trunk/content/documentation/tutorial.txt
source_changes at macosforge.org
source_changes at macosforge.org
Thu Oct 1 23:51:44 PDT 2009
Revision: 2708
http://trac.macosforge.org/projects/ruby/changeset/2708
Author: mattaimonetti at gmail.com
Date: 2009-10-01 23:51:44 -0700 (Thu, 01 Oct 2009)
Log Message:
-----------
display fix, take 2
Modified Paths:
--------------
MacRubyWebsite/trunk/content/documentation/tutorial.txt
Modified: MacRubyWebsite/trunk/content/documentation/tutorial.txt
===================================================================
--- MacRubyWebsite/trunk/content/documentation/tutorial.txt 2009-10-02 06:38:58 UTC (rev 2707)
+++ MacRubyWebsite/trunk/content/documentation/tutorial.txt 2009-10-02 06:51:44 UTC (rev 2708)
@@ -47,7 +47,6 @@
It is very easy to use an Objective-C class from MacRuby. You just have to refer to it as if it was a Ruby class. For example, to access the NSSound class:
-<code>
<pre class="commands">
$ /usr/local/bin/macirb --simple-prompt
>> framework 'Cocoa'
@@ -55,7 +54,6 @@
>> NSSound.ancestors
=> [NSSound, Object, NSObject, Kernel]
</pre>
-</code>
In MacRuby, all classes, including Ruby core classes, always inherit from NSObject, the root class of most Objective-C classes.
@@ -178,7 +176,7 @@
NSBorderlessWindowMask,
NSBackingStoreBuffered,
false)
-<% end -%>
+<% end -%>
To call setter methods on Objective-C objects, you normally call a method like setName, using the name as the argument. MacRuby provides a facility which allows the use of standard attribute writer methods:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20091001/70187d91/attachment.html>
More information about the macruby-changes
mailing list