Hi, I've uploaded the VisualStudio technology preview. I was hoping to add additional widgets before release but its so easy I didn't bother ;). Basically, VisualStudio when complete (~ 7 release cycles based on my normal product lifecycle ;) will provide a complete drag 'n drop javascript interface to Zope. It purposely doesn't support any DTML or other "programming" apart from javascript as you give it to your local web designer and say "whip up an interface for me". Then, you write the dtml handlers for the urls you gave them and voila! instant, active webpages! The DuoPath application by Dan Steinman (http://www.dansteinman.com/dynaduo) is what I'm modelling the system on. The left hand plain will contain a list of all widgets within the aquisition path + save and reload buttons, the middle contains the current workspace and the third contains a collaspable menu containing Properties, Behaviours, Themes and Events (gonna steal this one...). To use it, they create a form in the Zope interface and click on it. The interface described above will pop up and the Zope interface will show the XML representation of the form (just an XMLised HTML format). They can edit in either view. To create a widget, they click on the icon and drag its outline on the workspace and it is created automagically! The key thing here is that it works on both IE and NS - emulating iframes, behaviours etc when required. See the VisualStudio examples product for further information and a demo of a draggable colored box. Cheers, Anthony Pfrunder
On Thu, 30 Sep 1999, Anthony Pfrunder wrote:
Hi,
The DuoPath application by Dan Steinman (http://www.dansteinman.com/dynaduo) is what I'm modelling the system on.
Oops! The actual URL is: http://www.dansteinman.com/dynduo Sorry about that, Anthony Pfrunder
At 12:51 PM 9/30/99 +1000, you wrote:
Hi,
I've uploaded the VisualStudio technology preview. I was hoping to add additional widgets before release but its so easy I didn't bother ;).
This looks very cool, but I am unable to understand how to make it work. Also the 'editForm' tab gives me a traceback, Error Type: KeyError Error Value: toHTML Traceback (innermost last): File D:\PROGRA~1\ZOPE20~1.1\lib\python\ZPublisher\Publish.py, line 214, in publish_module File D:\PROGRA~1\ZOPE20~1.1\lib\python\ZPublisher\Publish.py, line 179, in publish File D:\PROGRA~1\ZOPE20~1.1\lib\python\Zope\__init__.py, line 201, in zpublisher_exception_hook (Object: Manageable) File D:\PROGRA~1\ZOPE20~1.1\lib\python\ZPublisher\Publish.py, line 165, in publish File D:\PROGRA~1\ZOPE20~1.1\lib\python\ZPublisher\mapply.py, line 160, in mapply (Object: manage_visualedit) File D:\PROGRA~1\ZOPE20~1.1\lib\python\ZPublisher\Publish.py, line 102, in call_object (Object: manage_visualedit) File D:\PROGRA~1\ZOPE20~1.1\lib\python\OFS\DTMLMethod.py, line 145, in __call__ (Object: manage_visualedit) File D:\PROGRA~1\ZOPE20~1.1\lib\python\DocumentTemplate\DT_String.py, line 502, in __call__ (Object: manage_visualedit) File D:\PROGRA~1\ZOPE20~1.1\lib\python\DocumentTemplate\DT_In.py, line 691, in renderwob (Object: cbody.getChildNodes()) KeyError: (see above) BTW, you might want to name your downloads with file extensions so that folks will have a better idea of what they are. I look forward to understanding more about this project. -Amos
Amos Latteier wrote:
At 12:51 PM 9/30/99 +1000, you wrote:
Hi,
I've uploaded the VisualStudio technology preview. I was hoping to add additional widgets before release but its so easy I didn't bother ;).
This looks very cool, but I am unable to understand how to make it work.
Me neither. :) When I try to view the VisualStudio_Examples folder, I get a traceback. Traceback (innermost last): File /home/zope/lib/python/ZPublisher/Publish.py, line 214, in publish_module File /home/zope/lib/python/ZPublisher/Publish.py, line 179, in publish File /home/zope/lib/python/Zope/__init__.py, line 201, in zpublisher_exception_hook (Object: ElementWithAttributes) File /home/zope/lib/python/ZPublisher/Publish.py, line 167, in publish File /home/zope/lib/python/ZPublisher/HTTPResponse.py, line 299, in setBody File /home/zope/lib/python/ZPublisher/HTTPResponse.py, line 510, in notFoundError NotFound: (see above) [snip]
I look forward to understanding more about this project.
Me too! Did anyone try XMLWidgets yet? Nobody seems to have.. Regards, Martijn
Martijn Faassen wrote:
Did anyone try XMLWidgets yet? Nobody seems to have..
The exported product is named XMLWidgets. The Python product is named XMLWidgets. If you try to import the exported product, it gives you an error that the name XMLWidgets is allready in use. Which is true. If you rename the python product, importing the exported product doesn't work. No such Module XMLWidets. Which is true. Renaming the .zexp file does nothing, it still thinks it's name is XMLWidgets, which is true. So Martijn, what's the secret password? ;) -Michel
Regards,
Martijn
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://www.zope.org/mailman/listinfo/zope-dev
(Related lists - please, no cross posts or HTML encoding!
To receive general Zope announcements, see: http://www.zope.org/mailman/listinfo/zope-announce
For non-developer, user-level issues, zope@zope.org, http://www.zope.org/mailman/listinfo/zope )
Michel Pelletier wrote:
Martijn Faassen wrote:
Did anyone try XMLWidgets yet? Nobody seems to have..
The exported product is named XMLWidgets. The Python product is named XMLWidgets. If you try to import the exported product, it gives you an error that the name XMLWidgets is allready in use. Which is true.
But it's not a Python product as such; it's just a set of Python base classes for the ZClasses in the product. It's true the Python part is the meat of it, the ZClasses themselves hardly add anything right now. So does the XMLWidgets product automatically become registered if I have a directory called that in the products directly? I've tried importing the .zexp file into a products dir and it worked fine.
If you rename the python product, importing the exported product doesn't work. No such Module XMLWidets. Which is true. Renaming the .zexp file does nothing, it still thinks it's name is XMLWidgets, which is true.
So Martijn, what's the secret password? ;)
Okay, going out on a limb here, try installing the XMLWidgets.tgz file (the python stuff). Then restart your Zope. Then go to the products management screen, and *delete* any XMLWidgets product that may show up. *then* import the XMLWidgets.zexp. And finally install the demo somewhere in the folder tree. Then tell me if it worked. :) There ought to be some way to distribute ZClasses with Python base classes easily, though... I'm really glad about this kind of feedback, though, even if it's just installation issues. :) Thanks! Martijn
Martijn Faassen wrote:
Okay, going out on a limb here, try installing the XMLWidgets.tgz file (the python stuff). Then restart your Zope. Then go to the products management screen, and *delete* any XMLWidgets product that may show up. *then* import the XMLWidgets.zexp. And finally install the demo somewhere in the folder tree. Then tell me if it worked. :)
Okay, I just tried this myself; it works. I imagine I got confused developing XMLWidgets. I'm not entirely sure *how* to distribute them in a different way, though. If I had put my ZClass in the XMLWidgets product that appears when I make the XMLWidgets stuff in the lib/python/Products dir, and then exported it, wouldn't we run in the same difficulties as what happened now? Perhaps that is what I did, actually. :)
There ought to be some way to distribute ZClasses with Python base classes easily, though...
After this experiment I'd like to stress this. Perhaps I'm missing something? Regards, Martijn
At 08:57 PM 9/30/99 +0200, Martijn Faassen wrote:
Okay, going out on a limb here, try installing the XMLWidgets.tgz file (the python stuff). Then restart your Zope. Then go to the products management screen, and *delete* any XMLWidgets product that may show up. *then* import the XMLWidgets.zexp. And finally install the demo somewhere in the folder tree. Then tell me if it worked. :)
Ahh. That worked. OK, now I have some examples, but it's still very unclear how to harness the potential power of this stuff. All instances seem to only have one management tab ('manage_access') which doesn't shed too much light on how to use them. Hmm. Digging a little, it looks like you call widgets with XML Documents. I'm I getting closer? So a widget is a template for a XML Document? BTW, if you want to have WidgetManager's work like DTML Methods, and be called as methods of parent objects try this, from DTMLMethod. class func_code: pass func_code=func_code() func_code.co_varnames='self','REQUEST','RESPONSE' func_code.co_argcount=3 I think that this will fool ZPublisher into considering your object a method of its parent.
There ought to be some way to distribute ZClasses with Python base classes easily, though...
Right. In the mean time it is a good idea not to create your ZClasses inside an installed Product. -Amos
Amos Latteier wrote:
At 08:57 PM 9/30/99 +0200, Martijn Faassen wrote:
Okay, going out on a limb here, try installing the XMLWidgets.tgz file (the python stuff). Then restart your Zope. Then go to the products management screen, and *delete* any XMLWidgets product that may show up. *then* import the XMLWidgets.zexp. And finally install the demo somewhere in the folder tree. Then tell me if it worked. :)
Ahh. That worked. OK, now I have some examples, but it's still very unclear how to harness the potential power of this stuff. All instances seem to only have one management tab ('manage_access') which doesn't shed too much light on how to use them.
The ZClasses are pretty boring right now and don't offer any management access; it was just an easy way to develop products without all the hassle that I had in 1.10. I'll get around to adding tabs later, when I figure out what to put in them!
Hmm. Digging a little, it looks like you call widgets with XML Documents. I'm I getting closer?
Did you read my release info? Basically you can let the manager onto any XML Node (of an XML Document), and if the manager recognizes the type and name of the XML Node, it'll find the widget to render it (which will recursively look for the sub widgets as well).
So a widget is a template for a XML Document?
Each widget can render an XML Node in a document (and any subnodes by recursive calling of the manager). So if you call the manager on the top widget of a document, the entire document will be rendered (if the manager is configured for that document structure). The powerful thing of is this that the widget manager can be dynamically reconfigured after one rendering. So you can have different displays of the same document (for instance you could select some elements and have those be rendered in a different way). Another powerful thing is that you can define events on widgets, which can be called through hyperlinks on the rendered document. These events can dynamically alter the way the widget manager renders things, and they can also change the structure of the XML Document. The goal of this is to make a structured document editor.
BTW, if you want to have WidgetManager's work like DTML Methods, and be called as methods of parent objects try this, from DTMLMethod.
class func_code: pass func_code=func_code() func_code.co_varnames='self','REQUEST','RESPONSE' func_code.co_argcount=3
I think that this will fool ZPublisher into considering your object a method of its parent.
I thought I already did something like this so I'm not sure what extra this will accomplish. You can already call the manager on top of any XML Node.
There ought to be some way to distribute ZClasses with Python base classes easily, though...
Right. In the mean time it is a good idea not to create your ZClasses inside an installed Product.
Would there still be any way to make zclasses inherit from the python base classes that the product defines this way, though? I'm not sure if they show up only in the one product or everywhere. I guess I should take a look. :) Regards, Martijn
participants (5)
-
Amos Latteier -
Anthony Pfrunder -
Martijn Faassen -
Martijn Faassen -
Michel Pelletier