[MacRuby-devel] [MacRuby] #239: NSXML classes cannot be modified properly
MacRuby
ruby-noreply at macosforge.org
Sun Mar 29 23:43:55 PDT 2009
#239: NSXML classes cannot be modified properly
------------------------------+---------------------------------------------
Reporter: kourge@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: major | Milestone: MacRuby 0.4
Component: MacRuby | Keywords:
------------------------------+---------------------------------------------
It would appear that NSXML Cocoa classes (such as NSXMLDocument and
NSXMLNode) can be opened properly, but modifications made to them fail
silently.
Example:
{{{
>> doc = NSXMLDocument.alloc.initWithXMLString "<root></root>", options:
0, error: nil
=> #<NSXMLDocument:0x800634d60>
>> doc.nodesForXPath("root", error: nil)
=> [#<NSXMLElement:0x800634de0>]
>> doc.nodesForXPath("root", error: nil)[0].XMLString
=> "<root></root>"
>> class NSXMLDocument
>> def find(path); self.nodesForXPath(path, error: nil); end
>> end
=> nil
>> doc.find "root"
NoMethodError: undefined method `find' for #<NSXMLDocument:0x800634d60>
from (irb):7
from /usr/local/bin/macirb:12:in `<main>'
>>
}}}
--
Ticket URL: <http://www.macruby.org/trac/ticket/239>
MacRuby <http://macruby.org/>
More information about the MacRuby-devel
mailing list