Event handling progress

From: Holger Hoffstätte (holge..izards.de)
Date: Tue Jan 21 2003 - 09:53:47 EST

  • Next message: Andrus Adamchik: "Re: Event handling progress"

    As discussed yesterday I've done some more work on the event stuff:

    - added a dataContextDidRollback event

    - made ContextCommitObserver the listener for DataContextTransaction
    events

    - removed the old handler class (solves a lot of potential problems)

    - removed the empty event handling superinterface (we can add it back in
    later if we really need to)

    - made everything more generic: event registration/dispatch now
    consistently expects EventListener & EventObject

    - consistently use the term listener everywhere, to avoid confusion
    between listener and observer (which is really a delegate in NSSpeak).

    Everything still works as expected, except for one thing that I cannot
    make work (or rather fail) in my (still unpublished) DataContext test.
    ContextCommitObserver is now also registered for #dataContextDidRollback,
    but for some reasons I cannot get a transaction to fail. I fetch an
    existing oneway.Artist, set its name to null (name is marked mandatory)
    and commitChanges. The CommitObserver correctly logs the UPDATE..[null]
    statement..and then happily finishes the transaction without complaining!?
    I'm testing against MySQL and neither MyISAM nor InnoDB tables seem to
    make a difference. I also tried to update name with String longer than 255
    characters, but that didn't explode either; it seems the name is just cut
    off.
    I'd be grateful for some pointers about this. I am not entirely sure
    whether the DID_ROLLBACK posting is in the right place (see
    DataContext:846).

    Holger

    PS: I promise I'll stop renaming stuff now ;)



    This archive was generated by hypermail 2.0.0 : Tue Jan 21 2003 - 09:54:37 EST