PyPN Save() Not Working?

Discussion Forums discussion PyPN Save() Not Working?

This topic contains 0 voices and has 3 replies.

Viewing 4 posts - 1 through 4 (of 4 total)
Author Posts
Author Posts
December 20, 2010 at 2:03 pm #5147

rimkojr
Member

I am having trouble getting the PyPN Save() method to work using portable PN2 v2.2.0.2240 and PyPN v0.12.2222.

The following code works with portable PN v2.0.10.1010 and PyPN v0.10.973 but not the new configuration:

@script("Save Current Document", "Editor")

def saveCurrentDoc():

doc = pn.CurrentDoc()

filename = doc.FileName

doc.Save(filename, True)

The error message when running on the new configuration is the following:

Python error: <class ‘Boost.Python.ArgumentError’>: Python argument types in

IDocument.Save(IDocument, unicode, bool)

did not match C++ signature:

Save(class extensions::IDocument {lvalue}, wchar_t const *, bool)

I’ve tried casting the filename variable as a string (it is a unicode) but no luck. Any ideas?

February 12, 2011 at 5:40 pm #17470

Nux
Member

This bugs me too. I have a script runner, but it doesn’t work too well because I cannot save the script I’m running.

March 3, 2011 at 11:37 pm #17472

simon
Key Master

Oops, this is a bug, please file it here:

http://code.google.com/p/pnotepad/issues/entry

March 5, 2011 at 9:03 pm #17473

Nux
Member

Added here:

http://code.google.com/p/pnotepad/issues/detail?id=1244

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.