[MacRuby] #1002: AXUIElement functions won't accept Pointers of type :id

MacRuby ruby-noreply at macosforge.org
Tue Nov 30 10:47:51 PST 2010


#1002: AXUIElement functions won't accept Pointers of type :id
---------------------------+------------------------------------------------
 Reporter:  haxie1@…       |        Owner:  lsansonetti@…        
     Type:  defect         |       Status:  reopened             
 Priority:  blocker        |    Milestone:  MacRuby 0.8          
Component:  MacRuby        |   Resolution:                       
 Keywords:                 |  
---------------------------+------------------------------------------------
Changes (by mrada@…):

  * status:  closed => reopened
  * resolution:  fixed =>


Comment:

 Laurent, I tried your test with the latest nightly build (I downloaded it
 a couple of minutes ago), but I am still getting an error and not the
 value of the string.

  ± cat test.rb
 framework 'Cocoa'

 pid  = 426 # => current PID of Mail.app for me
 mail = AXUIElementCreateApplication(pid)
 ptr  = Pointer.new :id
 ret  = AXUIElementCopyAttributeValue(mail, 'AXTitle', ptr)
 puts ptr[0]

 Then I get this:

  ± macruby test.rb
 /Users/ferrous/test.rb:6:in `<main>': expected instance of Pointer of type
 `^v', got `@' (TypeError)
 [1]    42769 exit 1     macruby test.rb

-- 
Ticket URL: <http://www.macruby.org/trac/ticket/1002#comment:5>
MacRuby <http://macruby.org/>



More information about the macruby-tickets mailing list