[MacRuby] #1002: AXUIElement functions won't accept Pointers of type :id
MacRuby
ruby-noreply at macosforge.org
Wed Nov 17 14:30:02 PST 2010
#1002: AXUIElement functions won't accept Pointers of type :id
---------------------------+------------------------------------------------
Reporter: haxie1@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: blocker | Milestone: MacRuby 0.8
Component: MacRuby | Keywords:
---------------------------+------------------------------------------------
I am working with the Carbon Accessibility API and running into an issue
with Pointers.
{{{
framework 'ApplicationServices'
pid = (Safari's pid)
safari = AXUIElementCreateApplication(pid)
titlePtr = Pointer.new(:id)
err = AXUIElementCopyAttributeValue(safari, "AXTitle", titlePtr)
}}}
error:
TypeError: expected instance of Pointer of type `^v', got `@'
Passing:
{{{
...
titlePtr = Pointer.new("^v")
err = AXUIElementCopyAttributeValue(safari, "AXTitle", titlePtr)
}}}
returns successfully but titlePtr is nil.
Since AXUIElementCopyAttributeValue takes a pointer to a CFTypeRef,
shouldn't I be able to pass a Pointer of type :id?
I am running the latest MacRuby nightly and have BridgeSupportPreview1
installed.
Regards,
Kam
--
Ticket URL: <http://www.macruby.org/trac/ticket/1002>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list