Hi,
I tried to get the python scripting extension running using:
- Python 2.5
- boost 1.33.1
- vc8
- PN2 2.0.654-devel
What happens:
(1) I press a key (well, one that corresponds to a letter) within a document in PN
(2) eventually DocSink::OnCharAdded(char c) is called
(3) OnCharAdded calls onCharAdded in glue.py and passes the character + a reference to the current document
But for some reason it throws an error message when the python script (glue.py) accesses a method of IDocumentPtr in function "onCharAdded".
> Python error: <type 'exceptions.AttributeError'>: 'IDocument' object has no attribute 'GetCurrentScheme'
I checked the document object: From within DocSink::OnCharAdded the method is accessible. This exception is also fired in case of any other method call of IDocument in python.
Printing the other parameter passed, char c, on the debug output window works fine. Does anyone know how boost does the "object conversion" and where I can dig further to find out what's wrong?
Why is boost necessary at all? Isn't there an another way to call python functions from within C++ without linking that massive (and IMMO not very elegantly written) library (even though we are only using the python relevant dll)?
Cheers,
Sven