Re: [Pyobjc-dev] Using DotMac Framework
Brought to you by:
ronaldoussoren
From: Ronald O. <ron...@ma...> - 2006-02-10 17:16:06
|
On 10-feb-2006, at 17:47, Bill Bumgarner wrote: > On Feb 9, 2006, at 10:45 PM, Chad Brantly wrote: >> I am trying to add the DotMac framework to my PyObjC program. Can >> you point me in the right direction to get started including this >> framework in my app and communicating with it? > > http://pyobjc.sourceforge.net/doc/wrapping.php (slightly out of > date, I think?) > > To load and interact with the API, use objc.loadBundle(): > > objc.loadBundle("DotMacKit", globals(), "/Volumes/DotMacSDK_2.0/ > DotMacKit.framework") > > This will, rather noisily, inject DotMacKit into your python script > (noisy in that your globals() will become quite polluted). From > there, it is just a matter of calling the ObjC classes and methods > like you would in any other framework. > > Unfortunately, DotMacKit has a ton of random constants and #defines > that won't be picked up by loadBundle(). Fortunately, PyObjC has a > mechanism for wrapping such frameworks. That mechanism needs a lot of work, if you (Chad) are not afraid of hacky python code: have a look at Scripts/CodeGenerators in the source distribution. If you have lots of free time you could take a look at sandbox/parsing in the repository as wel. That is an attempt at rewriting the CodeGenerator scripts that got stalled. The header- parsing bit should be 95+% done, the rest needs work. Ronald > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through > log files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD > SPLUNK! > http://sel.as-us.falkag.net/sel? > cmd=lnk&kid=103432&bid=230486&dat=121642 > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |