[Pythonmac-SIG] Carbon GetKeys() and NSObject.self()

Dethe Elza delza at alliances.org
Sun Nov 7 08:49:27 CET 2004

Hi folks,

Is there a way to access the Carbon GetKeys(keymap) method from within 
Python, or is that a job which calls for Pyrex?

Also, I'm getting a weird error when calling

% NSBundle.loadGSMarkupFile_externalNameTable_withZone_(self.filename, 
{'NSOwner': self}, None)
TypeError: Expecting instance of NSBundle as self, got one of 

(loadGSMarkupFile_externalNameTable_withZone_ is the Renaissance 
equivalent of loadNibFile_externalNameTable_withZone_)

The "self" in this case is a Python object, inheriting from NSObject 
which is the application delegate. Am I supposed to pass the bundle 
rather than the delegate object itself?  Should I be calling the 
NSObject.self() method instead of using my self object, and if so, how? 
  I tried using self.self() and got the same error.


"...coding isn't the poor handmaiden of design or analysis. Coding is
where your fuzzy, comfortable ideas awaken in the harsh dawn of reality.
It is where you learn what your computer can do. If you stop coding,
you stop learning."     Kent Beck, Smalltalk Best Practice Patterns
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2367 bytes
Desc: not available
Url : http://mail.python.org/pipermail/pythonmac-sig/attachments/20041106/dac2f196/smime.bin

More information about the Pythonmac-SIG mailing list