Agreed.
>Life would be easier if we did not depend on it.
Double agreed.
>One way to do this is
>to use the common event-handling idiom of returning "false" or "null"
>when you want the caller to do the job. So, for instance a
>"fetchEntity()" method might return NULL to indicate that the client
>wanted to leave it up to the SAX implementation.
I think this is a good approach that solves most of the problems. Then all
we must do is specify the default behavior. To do this we would get rid of
the base class (leaving an empty interface only). We would then go back
through the messages from the past few days and gather the places where
someone said: "and the base class could just do such-and-such which can be
overridden as desired" and move the such-and-such into the formally
specified behavior for each event when the Client declares NoInterest.
>Yet another way to do it would be to require the registration of objects
>for the handling of more complex events:
>
>registerEventFetcher( EventFetcher fletch );
Registration schemes can be very nice and quite scalable, but I do think
the extra cost is worth it. Especially given that your other proposal
makes sense.
David
================================
David Ornstein
Pragmatica, Inc.
http://www.pragmaticainc.com