2000-05-16

    More work on preparing XMLWidgets for release. Further cleaned up the
    editor, moving things into base classes.

    Exposed callMethodInContext() method on ZWidgetManager. This is used
    to call widget methods on nodes that aren't the current node that are
    being rendered (or in event callbacks). I wish this could be more
    transparent though.

    Created qd_process and qd_rocessAll quick&dirty methods which implement old
    behavior, without widget inheritance, without the ability to call
    other widget methods directly, but with more speed.
 
    Released XMLWidgets 0.7

2000-05-11

    Enabled widget inheritance (single inheritance) through more acquisition
    magic. This allowed me to clean up ZClass level DTML methods further,
    moving them into base classes (focused widgets inside sections inherit
    from xw_focused_in_section, which in turn inherits from xw_focused_base).
 
    Found a bug in the new acquisition magic that causes XMLDocument's
    getParentNode() to fail. Fixed it, but this does cause a slowdown
    in process()... (or in fact in the new method callMethodInContext()).
    Wish there was some cleaner way to dynamically associate widgets
    with nodes..

2000-05-10

    Added exception handler for ZamlTextError to the 'render' method
    of ZamlEditor.
     
    A new method of ZWidgetManager called 'process', is used by
    'processAll' and can also be used independently. It pulls together
    the widget and the node through acquisition magic. In practice
    this means you can use <dtml-var foo> where foo may be a something
    defined on the node, on the widget, or in the folder everything
    resides in (or ZClass) (also should work in that
    order). Finally. I hope!

    It seems to work. Did quite a complicated thing with edit_bar;
    it's defined in the ZClass for ZamlEditor, does <dtml-var
    insert_what>. If insert_what is defined in the widget but not the
    ZClass, it'll call that. If it's defined in the ZClass however, it
    calls that, which in turn calls <dtml-var insert_what_section>,
    which can be shared by multiple widgets. Sounds complicated, but
    really cleans up my code by allowing me to share a lot more
    things.

2000-05-09

    Added ZamlEditorBase.set_text() and get_text() that can deal with
    **strong** and *italic* and have potential for more.

    There seems to be some kind of memory leak in set_text(), though.

2000-05-04

    Merged two python base products ZamlEditor and ZamlViewer into
    a single one, ZamlBase.

2000-05-03

    Discovered the difference between render_helper and entity_hack;
    entity_hack was called from xw_TEXT, and this somehow made all the
    difference. I suspect this is due to non-implicit acquisition of text
    nodes. Using xml_manager.entity_hack makes it work.

2000-05-02

    Made a new python base class for the ZamlViewer ZClass, containing
    one method, entity_hack, that translates {foo} to &foo; (complete hack).

    Ran into odd behavior, calling entity_hack from the ZClass didn't work 
    for some odd reason. xml_manager.entity_hack() would work however, due
    to acquisition. Oddly enough, render_helper *can* be called.

2000-04-27
 
    More ZAML editor work.
   
    Worked on focusing behavior (using anchors). Discovered (again)
    that focusing from form actions doesn't work. Experimented with a
    redirect solution but found it too slow, and unwieldy as data
    can't be passed cleanly.

    Created Python base class for ZamlEditor. The only thing it contains
    now is a way to reformat paragraph text (doing line breaks and such).    

    Tried Javascript solution to focus behavior. It's jerky, but it works.

2000-04-26
  
   Mostly did work on ZAML layer on top of XMLWidgets.

   ZamlEditor:

      * Added 'edit_bar' DTML method which contains 'edit', 'delete'
        and 'insert' buttons (with dropdown lists for 'insert').
 
      * Added 'edit' Python Method which works with edit_bar.
      
      * Added focused_header and focused_footer to factor out focusing
        behavior.

      * moved it all into a ZClass. ZClass does *not* contain the
        document that's being edited -- that's an
        XMLDocument. Interface between the two needs more development.

   ZamlViewer:

      * Moved to a ZClass (with external XMLDocument, like ZamlEditor)

      * Added some new supported nodes. Not done yet.
   
   Found a buglet; exported a 1.0a5 XMLDocument, then imported it
   again into a Zope with XMLDocument 1.0a6. Weird bug happened until
   I refreshed the document by doing 'change'.

2000-04-25

   Added display_id system to make sure the events that are being
   triggered are triggered by the most recent update of the view;
   pressing the 'back' button and then triggering events is now
   detected and the event is ignored.
   
   This does mean any old sessions that do not contain display_id are
   invalid. I added a clearSession() method to EventManager that
   should help here; be sure to do a <dtml-var FSSession> before you
   call it, otherwise it won't work (perhaps I should change
   this?). The session is completely emptied, so the session ID should
   not be shared with anything else!
   
   Extended the ZAML editor; can now focus on sections, edit section title, 
   and insert and delete sections. Changed some of the code in the p
   Python methods (could use 'self' for the current node instead of
   a seperate 'node' argument, so removed that argument).

   More changes to the ZAML editor; focused paragraphs and sections
   now should be displayed at the top of the browser window. This is
   accomplished by putting the <a name="focus"> tag around the focused
   node in HTML. '#focus' is attached to the URLs to make it work.

   Did some tests on Internet Explorer. It appears to work. Any
   caching problems should be fixed by the display_id addition.

2000-04-21

   Ron Bickers confirmed with his DocbookDocument product that putting
   XMLWidgets inside ZClasses now works. It may still be a hack to use
   ObjectManagers in ZClasses, though...

2000-04-20

   Added 'above' and 'below' events to xw_focused_p, to insert above and
   below focused p. Made them PythonMethods, as they're easier to write than
   convoluted DTML Methods.

   Made _addWidgets and _clearWidgets methods on ZWidgetManager private
   (by prefixing with _). Added a _getWidget() method that will find 
   widget in both folders and ZClasses (it's a hack, though). Made adding
   widgets and setting default widget in WidgetManager work with _getWidget().
   Note that normal getting of widgets (getattr(self, widget_id)) still works
   when the ZClass is in use, so find() still works in the ordinary way.

   Added icons for XMLWidgetManager and XMLWidget.

   Changed interface of 'addNodeWidget()' to take node widget id instead of
   direct reference to node widget. This supports use with ZClasses, where
   referring to the widget directly somehow did not work consistently from
   DTML.

   Did some testing with putting XMLWidgets inside ZClasses. Both the
   viewing and editing systems seem to work now in my preliminary
   testing.

   Released XMLWidgets 0.6. (finally!)

2000-04-19

   Altered event system to support the editing of multiple documents at the
   same time by a single user. Factored out the event system into 
   EventManager mixin class for ZWidgetManager.

   Added a node_form_url() and node_form_hidden() method to create
   form-based events. Added 'edit' event in DTML. Can now edit
   contents of <p> nodes in ZAML, yay!

   Worked on a fix to enable the WidgetManager to find Widgets inside a
   ZClass.

2000-04-18

   Altered event system to work with FSSession. The same
   ZWidgetManager can now be used by a number of users to edit
   documents. Simplified the widgetfinder class, taking out lots of
   unused functionality. Also got rid of the UnitTest system (bad me!
   :).

2000-04-14

   XMLWidgets broke the root security tab, due to a missing comma in
   the __ac_permissions__ tuple in ZWidget.py (making it not a tuple
   at all, this confused Zope's security system). Added the ','. Thanks
   to Ralf Herold <ralf.herold@charite.de> for bringing this problem to my
   attention.

   Also fixed a spelling error in 'View management screens' in 
   ZWidgetManager.py, found during the same bug hunt.

   Perhaps Zope could do some more automatic checking of __ac_permissions__,
   often you don't introduce new permissions, just add to existing ones.
   Perhaps a seperate tuple could be used for the introduction of new
   permissions, and Zope could fail to load a product if the product
   introduces new one in the __ac_permissions__ list. Perhaps more backward
   compatible would be to have a 'check_permissions' attribute that we can
   use signal to Zope we want the permissions to be checked when loading the
   product.

2000-04-13

   For the last couple of days, worked on adding event system to
   XMLWidgets. Also some minor tweaks.
  
   Added optional 'view method' for use with event system. Call to
   event_url() will return url with view method appended.

2000-04-10

   Added a 'processAll' method on ZWidgetManager. This is intended to
   be a fast replacement to Ron Bicker's DTML loop in 'render_helper'.

   Got XMLDocument fix from Amos Latteier.
 
2000-04-07

   Tracked down a bug in XMLDocument causing XMLWidgets to go into
   an infinite loop, eventually crashing Zope.

2000-04-06

   Cleaned out some old cruft.

   Added default widget. The default widget (if set) is used if an
   element node is not recognized by the widget finder. This can help
   when doing incremental development. Thanks to Ron Bickers for this
   idea.

   Added warning to XMLWidget 'settings' screen. If you update the
   nodename of a widget without updating the widgetmanagers, errors
   will happen. For internal reasons this problem is hard to resolve,
   so I've added the warning.  Thanks to Ron Bickers for reporting
   this problem.

   Added DocBookDemo to xmlwidgets-0.5.zexp, thanks Ron Bickers!

   Released XMLWidgets 0.5.

2000-04-05

  Fixed bug in WidgetManager. It would not clear widgets. Thanks to
  Ron Bickers <rbickers@logicetc.com> for reporting this bug.

  Fixed bug in XMLWidgets so it works with #text nodes as well. This
  was due to acquisition problems; #text nodes only support explicit
  acquisition.  Thanks to Ron Bickers <rbickers@logicetc.com> for
  reporting this bug.

  Added 'xml_manager' REQUEST variable that can be accessed from
  widget DTML code, to access methods on the current widgetmanager.

  Released XMLWidgets 0.4.

  Changed 'xml_manager' REQUEST variable; must be set *before* rendering
  starts, in DTML, now. It can then be referred to from the widgets or
  helper DTML so that the widgets can be independent of widgetmanager;
  this way different widgetmanagers can use different widgets. See the
  ZAML demo.
  
2000-04-04 

  Added 'getElementNodes()' convenience function on Widget. This can
  be used from DTML and will return a list of all subnodes which are
  element nodes. All other subnodes are ignored. You can call it from
  DTML with something like: 

  <dtml-in "xwl_widget.getElementNodes(this())">

  Added standard isNodeSupported method to do simple validation while
  finding a widget. If the method is present, and returns 'false' for
  a particular node, that node will not be found for that widget. If
  the method is absent, widget will always be found if node names
  match. 

  Added nicer error reporting when no widget can be found.

  Added 'xml_widget' REQUEST variable that can be accessed from widget
  DTML code, to access methods on the current widget.
