From: Laurent S. <lsa...@ap...> - 2008-01-15 12:41:21
|
Hi Patrick, Unfortunately, HIServices is not covered yet by bridge support. I suggest you to file an Apple bug (http://bugreporter.apple.com) for this and request the file to be created in the future. In the meantime, you can either generate a file by yourself (see gen_bridge_metadata(1) for some help), manually bind the functions using a C extension, or use the dynamic linker (dyld) at runtime. If you want to go with the gen_bridge_metadata way, the following should work (untested though) $ sudo mkdir /System/Library/Frameworks/ApplicationServices.framework/ Frameworks/HIServices.framework/Resources/BridgeSupport $ sudo gen_bridge_metadata -f /System/Library/Frameworks/ ApplicationServices.framework/Frameworks/HIServices.framework -c '- framework ApplicationServices -F/System/Library/Frameworks/ ApplicationServices.framework/Frameworks' -o /System/Library/ Frameworks/ApplicationServices.framework/Frameworks/ HIServices.framework/Resources/BridgeSupport/HIServices.bridgesupport $ irb -r osx/cocoa > OSX.require_framework '/System/Library/Frameworks/ ApplicationServices.framework/Frameworks/HIServices.framework' > OSX::AXUIElementCopyElementAtPosition(...) HTH, Laurent On Jan 15, 2008, at 11:20 AM, Patrick Geiller wrote: > Hello, > > I'm trying to call accessibility functions (like > AXUIElementCopyElementAtPosition). I've included the framework with > require_framework 'ApplicationServices', but all I get is an > 'undefined method' error. > > On disk, Application Services is split up in subframeworks and > HIServices (containing AX*) does not contain a BridgeSupport > directory. Is the BridgeSupport defined elsewhere ? Do I need to > generate it for this particular framework ? Is there any other way to > call these functions ? > > > Thanks, > - Patrick > > > > ------------------------------------------------------------------------- > Check out the new SourceForge.net Marketplace. > It's the best place to buy or sell services for > just about anything Open Source. > http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |