Re: [MacRuby-devel] Understanding Pointer objects

2010-10-26 Thread Mark Rada
On 2010-10-25, at 11:39 PM, Laurent Sansonetti wrote: > Hi Mark, > >> Ah, that does work, and seems to have worked for a number of other things I >> am trying to do. >> >> The only problem now is when I have something like >> >> value = Pointer.new '^v' # pointer to pointer to void >>

Re: [MacRuby-devel] Understanding Pointer objects

2010-10-25 Thread Laurent Sansonetti
Hi Mark, > Ah, that does work, and seems to have worked for a number of other things I > am trying to do. > > The only problem now is when I have something like > > value = Pointer.new '^v' # pointer to pointer to void > AXUIElementCopyAttributeValue mail_object, 'AXHidden', value

Re: [MacRuby-devel] Understanding Pointer objects

2010-10-24 Thread Mark Rada
On 2010-10-24, at 9:34 PM, Laurent Sansonetti wrote: > Hi Mark, > > Matt already replied but I thought I would give more info. > > On Oct 23, 2010, at 10:04 PM, Mark Rada wrote: > >> Hi, >> >> I've been trying to play with using the Accessibility API to do some >> automated testing. >> >>>

Re: [MacRuby-devel] Understanding Pointer objects

2010-10-24 Thread Laurent Sansonetti
Hi Mark, Matt already replied but I thought I would give more info. On Oct 23, 2010, at 10:04 PM, Mark Rada wrote: > Hi, > > I've been trying to play with using the Accessibility API to do some > automated testing. > >> From what I have researched, I have to use some C functions that often ne

Re: [MacRuby-devel] Understanding Pointer objects

2010-10-24 Thread Laurent Sansonetti
Hi Caio, On Oct 24, 2010, at 11:09 AM, Caio Chassot wrote: > On 2010-10-24, at 05:06 , Matt Aimonetti wrote: > > Is there any difference if I do these instead: > >> pointer = Pointer.new_with_type("f") > > p = Pointer.new(:float) #<= new instead of new_with_type > >> pointer.assign(3.2) > >

Re: [MacRuby-devel] Understanding Pointer objects

2010-10-24 Thread Mark Rada
Hey, Thanks for the response. It has helped, but I am still confused a bit by you stating that none of the types are supported but that I can still dereference a pointer. I have now been able to dereference some pointers, but not pointers to pointers. Is that what you meant? In these cases I

Re: [MacRuby-devel] Understanding Pointer objects

2010-10-24 Thread Caio Chassot
On 2010-10-24, at 05:06 , Matt Aimonetti wrote: Is there any difference if I do these instead: > pointer = Pointer.new_with_type("f") p = Pointer.new(:float) #<= new instead of new_with_type > pointer.assign(3.2) p[0] = 3.2 #<= #[]= instead of #assign I have used both successf

Re: [MacRuby-devel] Understanding Pointer objects

2010-10-24 Thread Matt Aimonetti
You can set pointers using: Pointer.new_with_type and using one of the following types: http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtTypeEncodings.html#//apple_ref/doc/uid/TP40008048-CH100-SW1 Note, that not none of the types are supported.

[MacRuby-devel] Understanding Pointer objects

2010-10-23 Thread Mark Rada
Hi, I've been trying to play with using the Accessibility API to do some automated testing. >From what I have researched, I have to use some C functions that often need a >reference passed to the them. I am at a loss when trying to deal with Pointer objects. I've tried playing with them and