Ticket #97 (closed defect: fixed)
A selector cannot be nil
| Reported by: | vincent.isambart@… | Owned by: | lsansonetti@… |
|---|---|---|---|
| Priority: | blocker | Milestone: | MacRuby 0.3 |
| Component: | MacRuby | Keywords: | |
| Cc: |
Description
In Objectve-C a selector can be nil, for example the following code is correct:
NSMenuItem *dummyItem = [[NSMenuItem alloc] initWithTitle:@"" action:nil keyEquivalent:@""];
but in MacRuby we get an error:
% macruby -e "framework 'Cocoa'; NSMenuItem.alloc.initWithTitle('', action:nil, keyEquivalent:'')"
-e:1:in `initWithTitle:action:keyEquivalent:': can't convert Ruby object `nil' to Objective-C value of type `:' (ArgumentError)
from -e:1:in `<main>'
So I think MacRuby should support conversion from nil for selectors.
Change History
Note: See
TracTickets for help on using
tickets.

