[sword-devel] Unicode python strings and SWIG interface
jon at jbrisbin.com
Thu Dec 20 10:29:20 MST 2007
I've finally got a user interface clobbed together in
InterfaceBuilder. I've got a static SWMgr that I'm initializing by
calling augmentModules on every ".swd" directory in my application
support directory. The error I'm getting seems to indicate that it
doesn't like that I'm using Unicode strings (which is what the
NSFileManager gives me back):
fm = NSFileManager.defaultManager()
modules = fm.directoryContentsAtPath_( appSupportPath )
hasAnyModules = False
for mod in modules:
if mod.pathExtension() == "swd":
hasAnyModules = True
augmentedPath = appSupportPath + "/" + mod
NSLog( "Augmenting path: " + augmentedPath )
ScripturesManager.mgr.augmentModules( augmentedPath )
But this is resulting in the following error:
2007-12-20 11:23:00.718 Scriptures[2919:10b] Creating new SWMgr
2007-12-20 11:23:00.724 Scriptures[2919:10b] Augmenting path: /Users/
2007-12-20 11:23:00.726 Scriptures[2919:10b] <type
'exceptions.NotImplementedError'>: Wrong number of arguments for
overloaded function 'SWMgr_augmentModules'.
Possible C/C++ prototypes are:
augmentModules(char const *,bool)
augmentModules(char const *)
So it looks like I've got to covert my Unicode string to a C string or
something similar so that SWIG can find the method I'm trying to call.
Should I be doing this differently?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the sword-devel