[Pyobjc-dev] Wrapping SkimNotes framework
Brought to you by:
ronaldoussoren
From: Jonas Z. <li...@jo...> - 2009-11-15 12:02:24
|
Hi, I'm quite new to Python and pyobjc; I've searched the pyobjc documentation and this list archive but couldn't find an answer to my problem: I'd like to wrap the SkimNotes framework. It extends several standard Cocoa classes such as PDFDocument and NSFileManager using informal protocols. The methods defined in the framework are actually implemented as well. In the examples I've found for using objc.informal_protocol it seems that these are expected to be implemented in the Python code? So if I want to use the framework with code like this: objc.loadBundle("SkimNotes", globals(), bundle_path=objc.pathForFramework(pathToSkimNotes)) SKNPDFDocument = objc.informal_protocol('SKNPDFDocument',[objc.selector(None, selector="SkimNotesAtURL",signature="[@]@:@",isRequired=0), objc.selector(None, selector="notes",signature="[@]",isRequired=0)]) how do I actually get an instance of PDFDocument that listens to the method SkimNotesAtURL defined and implemented in the framework? Sorry for being confus(ed/ing)... Jonas |