[MacRuby-devel] [macruby] #38: Unable to use NS* constants in NSObject subclass.
macruby
ruby-noreply at macosforge.org
Fri Jul 4 20:55:53 PDT 2008
#38: Unable to use NS* constants in NSObject subclass.
----------------------------+-----------------------------------------------
Reporter: alloye at mac.com | Owner: lsansonetti at apple.com
Type: defect | Status: new
Priority: blocker | Milestone: MacRuby 0.3
Component: MacRuby | Resolution:
Keywords: |
----------------------------+-----------------------------------------------
Comment (by lsansonetti at apple.com):
This is addressed in trunk. Inheriting from NSObject directory will raise
a warning and automatically inherit from Object.
{{{
$ macirb
>> framework 'Cocoa'
=> true
>> class Foo < NSObject
>> def mask; NSShiftKeyMask; end
>> end
(irb):3: warning: Do not subclass NSObject directly, please subclass
Object instead.
=> nil
>> Foo.new.mask
=> 131072
}}}
--
Ticket URL: <https://www.macruby.org/trac/ticket/38#comment:5>
macruby <http://macruby.org/>
More information about the MacRuby-devel
mailing list