Zope External Editor
Hi Casey, thanks for the wonderful product, I installed it under SuSE linux and use it with the xjed-editor and just for a test with staroffice 5.2 and it works great. Why did it take so long, till someone implemented this obious solution ? this is the solution I have been waiting for since years. Many thanks again. When do you think, the windowshelper-app will be available ? Mit freundlichen Grüßen Joachim Schmitz -------------------------------------------------------------------- AixtraWare Ingenieurbüro für Internetanwendungen Hüsgenstr. 33a, D-52457 Aldenhoven Telefon: +49-2464-8851, FAX: +49-2464-905163 -------------------------------------------------------------------- Key fingerprint = DA10 CC82 62F8 1DBB 39A1 1EDC 725B 3317 A8D7 C3A6 Keyserver: http://www.keyserver.net/en/
Hi Casey, I installed ZEE and get the external edit-icon on all items contained in a "normal Folder". But since I working a lot with ZPatterns, most of my items are contained in ZPatterns specialists. How do I enable ZEE support for other containers ? Mit freundlichen Grüßen Joachim Schmitz -------------------------------------------------------------------- AixtraWare Ingenieurbüro für Internetanwendungen Hüsgenstr. 33a, D-52457 Aldenhoven Telefon: +49-2464-8851, FAX: +49-2464-905163 -------------------------------------------------------------------- Key fingerprint = DA10 CC82 62F8 1DBB 39A1 1EDC 725B 3317 A8D7 C3A6 Keyserver: http://www.keyserver.net/en/
On Thursday 16 May 2002 07:16 am, Joachim Schmitz wrote:
Hi Casey,
I installed ZEE and get the external edit-icon on all items contained in a "normal Folder". But since I working a lot with ZPatterns, most of my items are contained in ZPatterns specialists. How do I enable ZEE support for other containers ?
It currently supports objects that have the methods: document_src, manage_FTPget and read. What is the method to get the content of these objects? I can add it to the methods names that are checked and tried. -Casey
--On Donnerstag, Mai 16, 2002 09:53:13 -0400 Casey Duncan <casey@zope.com> wrote:
On Thursday 16 May 2002 07:16 am, Joachim Schmitz wrote:
Hi Casey,
I installed ZEE and get the external edit-icon on all items contained in a "normal Folder". But since I working a lot with ZPatterns, most of my items are contained in ZPatterns specialists. How do I enable ZEE support for other containers ?
It currently supports objects that have the methods: document_src, manage_FTPget and read. What is the method to get the content of these objects? I can add it to the methods names that are checked and tried. I don't want to get those objects, the little pencil does not show up behind zpts or dtml-method contained in such a folder, I can invoke the editor with
http://zopeserver/Specialist/externalEdit_/document thought, but the pencil, does not show behind document.
-Casey
Mit freundlichen Grüßen Joachim Schmitz -------------------------------------------------------------------- AixtraWare Ingenieurbüro für Internetanwendungen Hüsgenstr. 33a, D-52457 Aldenhoven Telefon: +49-2464-8851, FAX: +49-2464-905163 -------------------------------------------------------------------- Key fingerprint = DA10 CC82 62F8 1DBB 39A1 1EDC 725B 3317 A8D7 C3A6 Keyserver: http://www.keyserver.net/en/
On Thursday 16 May 2002 07:16 am, Joachim Schmitz wrote:
Hi Casey,
I installed ZEE and get the external edit-icon on all items contained in a "normal Folder". But since I working a lot with ZPatterns, most of my items are contained in ZPatterns specialists. How do I enable ZEE support for other containers ?
Actually I think I misunderstood the question. In order to make this work you need to change the managment screen (manage_main) for that object. Take a look at how the __init__.py in the product does this. The lines to include in the management screen start on line 136 of the manage_main.dtml in the product. hth, Casey
--On Donnerstag, Mai 16, 2002 10:35:57 -0400 Casey Duncan <casey@zope.com> wrote:
On Thursday 16 May 2002 07:16 am, Joachim Schmitz wrote:
Hi Casey,
I installed ZEE and get the external edit-icon on all items contained in a "normal Folder". But since I working a lot with ZPatterns, most of my items are contained in ZPatterns specialists. How do I enable ZEE support for other containers ?
Actually I think I misunderstood the question. In order to make this work you need to change the managment screen (manage_main) for that object.
Take a look at how the __init__.py in the product does this. The lines to include in the management screen start on line 136 of the manage_main.dtml in the product.
I think it has no own, it takes the standard objectmanager manage_main may I simply replace this ?
hth,
Casey
Mit freundlichen Grüßen Joachim Schmitz -------------------------------------------------------------------- AixtraWare Ingenieurbüro für Internetanwendungen Hüsgenstr. 33a, D-52457 Aldenhoven Telefon: +49-2464-8851, FAX: +49-2464-905163 -------------------------------------------------------------------- Key fingerprint = DA10 CC82 62F8 1DBB 39A1 1EDC 725B 3317 A8D7 C3A6 Keyserver: http://www.keyserver.net/en/
On Thursday 16 May 2002 10:50 am, Joachim Schmitz wrote:
--On Donnerstag, Mai 16, 2002 10:35:57 -0400 Casey Duncan <casey@zope.com> wrote:
On Thursday 16 May 2002 07:16 am, Joachim Schmitz wrote:
Hi Casey,
I installed ZEE and get the external edit-icon on all items contained in a "normal Folder". But since I working a lot with ZPatterns, most of my items are contained in ZPatterns specialists. How do I enable ZEE support for other containers ?
Actually I think I misunderstood the question. In order to make this work you need to change the managment screen (manage_main) for that object.
Take a look at how the __init__.py in the product does this. The lines to include in the management screen start on line 136 of the manage_main.dtml in the product.
I think it has no own, it takes the standard objectmanager manage_main may I simply replace this
Yes, just replace it with the one from the in the ExternalEditor product. Make a backup first, tho just in case. -Casey
Casey Duncan wrote:
On Thursday 16 May 2002 10:50 am, Joachim Schmitz wrote:
--On Donnerstag, Mai 16, 2002 10:35:57 -0400 Casey Duncan <casey@zope.com> wrote:
On Thursday 16 May 2002 07:16 am, Joachim Schmitz wrote:
Hi Casey,
I installed ZEE and get the external edit-icon on all items contained in a "normal Folder". But since I working a lot with ZPatterns, most of my items are contained in ZPatterns specialists. How do I enable ZEE support for other containers ?
Actually I think I misunderstood the question. In order to make this work you need to change the managment screen (manage_main) for that object.
Take a look at how the __init__.py in the product does this. The lines to include in the management screen start on line 136 of the manage_main.dtml in the product.
I think it has no own, it takes the standard objectmanager manage_main may I simply replace this
Yes, just replace it with the one from the in the ExternalEditor product. Make a backup first, tho just in case.
Hi, Casey This is a Truly Masterful Product! Thanks! I've done some work to make it work (for me) in other places, and it appears that the link code: <dtml-let explicit="_.getitem('sequence-item').aq_explicit"> <dtml-if expr="_.hasattr(explicit, 'manage_FTPget') or _.hasattr(explicit, 'read') or _.hasattr(explicit, 'document_src')"> <a href="&dtml-URL1;/externalEdit_/&dtml.url_quote-sequence-key;" title="Edit using external editor" ><img src="&dtml-BASEPATH1;/misc_/ExternalEditor/edit_icon" align="middle" hspace="2" border="0" alt="External Editor" /></a> </dtml-if> </dtml-let> will be reused over and over. I was wondering whether you might consider in the future factoring the link code into a separate DTML method so that it can be obtained by acquisition. That way, the code would reside once in e.g., ObjectManager; and then OrderedFolder, FindSupport, etc. could acquire it by using e.g., <dtml-var external_editor_link> instead of a full copy of the link code. Just a suggestion. -- Jim Washington
On Friday 24 May 2002 11:58 am, Jim Washington wrote: [snip old stuff]
Hi, Casey
This is a Truly Masterful Product! Thanks!
I've done some work to make it work (for me) in other places, and it appears that the link code:
<dtml-let explicit="_.getitem('sequence-item').aq_explicit"> <dtml-if expr="_.hasattr(explicit, 'manage_FTPget') or _.hasattr(explicit, 'read') or _.hasattr(explicit, 'document_src')"> <a href="&dtml-URL1;/externalEdit_/&dtml.url_quote-sequence-key;" title="Edit using external editor" ><img src="&dtml-BASEPATH1;/misc_/ExternalEditor/edit_icon" align="middle" hspace="2" border="0" alt="External Editor" /></a> </dtml-if> </dtml-let>
will be reused over and over.
I was wondering whether you might consider in the future factoring the link code into a separate DTML method so that it can be obtained by acquisition. That way, the code would reside once in e.g., ObjectManager; and then OrderedFolder, FindSupport, etc. could acquire it by using e.g., <dtml-var external_editor_link> instead of a full copy of the link code.
This sounds like a pretty good idea. I'll do this in the next release. Thanks for the suggestions! -Casey
On Fri, May 24, 2002 at 12:42:19PM -0400, Casey Duncan wrote:
This sounds like a pretty good idea. I'll do this in the next release.
When do you plan to release the next version ? It's really Fantastic (tm), I can hardly wait ! bye, Jerome Alet
Over time one learns that the best way to jinx the release date is to preannounce it. I'll leave it at "soon". For the impatient there is always the current version (which I use) in the Zope cvs under Products/ExternalEditor. Several improvements have been checked in there since the last release. Those lacking cvs zen can get it from http://cvs.zope.org/Products/ExternalEditor as well. -Casey On Friday 24 May 2002 01:25 pm, Jerome Alet wrote:
On Fri, May 24, 2002 at 12:42:19PM -0400, Casey Duncan wrote:
This sounds like a pretty good idea. I'll do this in the next release.
When do you plan to release the next version ?
It's really Fantastic (tm), I can hardly wait !
bye,
Jerome Alet
Casey Duncan wrote:
On Friday 24 May 2002 11:58 am, Jim Washington wrote: [snip old stuff]
Hi, Casey
This is a Truly Masterful Product! Thanks!
I've done some work to make it work (for me) in other places, and it appears that the link code:
<dtml-let explicit="_.getitem('sequence-item').aq_explicit"> <dtml-if expr="_.hasattr(explicit, 'manage_FTPget') or _.hasattr(explicit, 'read') or _.hasattr(explicit, 'document_src')"> <a href="&dtml-URL1;/externalEdit_/&dtml.url_quote-sequence-key;" title="Edit using external editor" ><img src="&dtml-BASEPATH1;/misc_/ExternalEditor/edit_icon" align="middle" hspace="2" border="0" alt="External Editor" /></a> </dtml-if> </dtml-let>
will be reused over and over.
I was wondering whether you might consider in the future factoring the link code into a separate DTML method so that it can be obtained by acquisition. That way, the code would reside once in e.g., ObjectManager; and then OrderedFolder, FindSupport, etc. could acquire it by using e.g., <dtml-var external_editor_link> instead of a full copy of the link code.
This sounds like a pretty good idea. I'll do this in the next release.
Thanks for the suggestions!
-Casey
And one always finds a problem right after publishing, right? The link calculation needs to be something like <a href= "<dtml-var expr="explicit.absolute_url()[:explicit.absolute_url().rfind('/')]">/externalEdit_/<dtml-var expr="explicit.getId()">" if you want it to work everywhere in FindSupport. URL1 is relative to the folder you are finding from, and the link needs to be where the object is. -- Jim Washington
On Friday 24 May 2002 01:34 pm, Jim Washington wrote:
Casey Duncan wrote:
On Friday 24 May 2002 11:58 am, Jim Washington wrote: [snip old stuff]
Hi, Casey
This is a Truly Masterful Product! Thanks!
I've done some work to make it work (for me) in other places, and it appears that the link code:
<dtml-let explicit="_.getitem('sequence-item').aq_explicit"> <dtml-if expr="_.hasattr(explicit, 'manage_FTPget') or _.hasattr(explicit, 'read') or _.hasattr(explicit, 'document_src')"> <a href="&dtml-URL1;/externalEdit_/&dtml.url_quote-sequence-key;" title="Edit using external editor" ><img src="&dtml-BASEPATH1;/misc_/ExternalEditor/edit_icon" align="middle" hspace="2" border="0" alt="External Editor" /></a> </dtml-if> </dtml-let>
will be reused over and over.
I was wondering whether you might consider in the future factoring the link code into a separate DTML method so that it can be obtained by acquisition. That way, the code would reside once in e.g., ObjectManager; and then OrderedFolder, FindSupport, etc. could acquire it by using e.g., <dtml-var external_editor_link> instead of a full copy of the link code.
This sounds like a pretty good idea. I'll do this in the next release.
Thanks for the suggestions!
-Casey
And one always finds a problem right after publishing, right?
The link calculation needs to be something like
<a href= "<dtml-var
expr="explicit.absolute_url()[:explicit.absolute_url().rfind('/')]">/externalEdit_/<dtml-var
expr="explicit.getId()">"
After looking at that, one word comes to mind: ohmygod! Hows about: aq_inner.aq_parent.absolute_url()? I think I'll try that on for size instead. ;^) Thanks for pointing this out though. -Casey
Casey Duncan wrote:
After looking at that, one word comes to mind: ohmygod!
Hows about: aq_inner.aq_parent.absolute_url()?
I think I'll try that on for size instead. ;^)
Thanks for pointing this out though.
-Casey
Yup, of course, that was what I really meant :P And it works fine. Now I am trying to figure out why I get Attribute Error when I click to ExternalEdit an object inside a ZClass. Yippee! -- Jim
I wrote:
(...) Now I am trying to figure out why I get Attribute Error when I click to ExternalEdit an object inside a ZClass. Yippee!
Found it. ExternalEditor Class: def index_html(self, REQUEST, RESPONSE): """Publish the object to the external editor helper app""" security = getSecurityManager() #previously-used line #ob = getattr(self.aq_parent, REQUEST['target']) #this works parent = self.aq_parent try: ob = parent[REQUEST['target']] except AttributeError: ob = parent.propertysheets.methods[REQUEST['target']] #end new code if not security.checkPermission('View management screen', ob): raise 'Unauthorized' ... It works inside ZClasses, on ZClasses/FindTab, and everywhere else I have looked. -- Jim Washington
Thanks a lot! I will go ahead and check this in. -Casey On Friday 24 May 2002 05:16 pm, Jim Washington wrote:
I wrote:
(...) Now I am trying to figure out why I get Attribute Error when I click to ExternalEdit an object inside a ZClass. Yippee!
Found it. ExternalEditor Class:
def index_html(self, REQUEST, RESPONSE): """Publish the object to the external editor helper app"""
security = getSecurityManager() #previously-used line #ob = getattr(self.aq_parent, REQUEST['target']) #this works parent = self.aq_parent try: ob = parent[REQUEST['target']] except AttributeError: ob = parent.propertysheets.methods[REQUEST['target']] #end new code if not security.checkPermission('View management screen', ob): raise 'Unauthorized' ...
It works inside ZClasses, on ZClasses/FindTab, and everywhere else I have looked.
-- Jim Washington
On Thursday 16 May 2002 05:38 am, Joachim Schmitz wrote:
Hi Casey,
thanks for the wonderful product, I installed it under SuSE linux and use it with the xjed-editor and just for a test with staroffice 5.2 and it works great. Why did it take so long, till someone implemented this obious solution ?
I'll take that as a complement. Good solutions are usually obvious only in hindsight 8^). I honestly think nobody thought to do it this way before I did. Maybe they did, but didn't follow through. Oh well, at least its done now.
this is the solution I have been waiting for since years. Many thanks again.
Your welcome. Glad to hear that it works for you.
When do you think, the windowshelper-app will be available ?
Some ppl are working on getting the helper app in Python to work on Windows. However, it will be somewhat crippled due to deficiencies in the process control capabilities on Python for Windows. I will be writing a helper app that runs against the Windows scripting host (and therefore doesn't require Python) in the next few weeks. I have a new baby at home, so my spare time is fleeting at best. However I do want to see this work right on Windows. It's baffling but a lot of people still use it ;^). -Casey
participants (4)
-
Casey Duncan -
Jerome Alet -
Jim Washington -
Joachim Schmitz