Syntext Forums - Serna Enterprise XML Editor, Serna Free XML Editor
(#1 (permalink))
Old
Junior Member
 
Posts: 26
Join Date: Jul 2009
Default Need help: plugin instance, associated with an active SernaDoc - 09-21-2009, 03:38 PM

Hi, I'm trying to get a plugin instance for the active document, the documentation for the SernaDoc says that there is a method to consume:
-----
DocumentPlugin * plugin() const
Returns associated DocumentPlugin instance.
-----
But when I'm trying to use it, an exception is raised that there is no such a method, and the debug session confirms this - the method "plugin" is not shown in the list of all available methods. Could you help me how I can get a plugin instance having active SernaDoc using Serna Python API?
Reply With Quote
(#2 (permalink))
Old
Administrator
 
Posts: 72
Join Date: Mar 2009
Default 09-23-2009, 03:38 PM

It seems that our documentation contains unactual information.

Can you please describe your use-case in details?
Also, could you please send us your code sample if it's possible.
We'll try to propose a solution for you.
Reply With Quote
(#3 (permalink))
Old
Junior Member
 
Posts: 26
Join Date: Jul 2009
Default use case requring a plugin for the SernaDoc - 09-23-2009, 04:50 PM

The use case is: my plugin is implementing an access to our CMS repository. I'm opening a document, then opening a new non-modal dialog window that shows documents in our repository. Then I drag-and-drop a document from the dialog window to the Serna document window.
It works for a document that was active when the dialog was opened; but if I open another document and try to drag-and-drop into it, I need to have this new document properties - not just Serna properties, but properties that were initialized in my plugin during the opening procedure (CMS id, class name, etc.) and which will be used for a SernaDocFragment creation.
The plugin won't work without our CMS, so I'm attaching 2 modules that contain code in question. BrowseTreeView.py - module containing drag-and-drop logic for the dialog, and textToFragment.py - an extension of MimeCallback, creating object to be dropped.
Thanks for your help!
Attached Files
File Type: zip PluginModules.zip (2.0 KB, 3 views)
Reply With Quote
(#4 (permalink))
Old
Junior Member
 
Posts: 26
Join Date: Jul 2009
Default 11-09-2009, 06:05 PM

Hi! Does nobody care to help me with this one?
Reply With Quote
(#5 (permalink))
Old
kondor's Avatar
линукс-покемон
 
Posts: 48
Join Date: Apr 2009
Default 11-09-2009, 06:58 PM

Hello Gluke,

Sorry, currently we do not have enough resources to research your issue. Maybe somebody of community will take a look?


Get the latest updates on Syntext Blog
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.1
vBulletin Skin developed by: vBStyles.com