Re: Homework question relating to docview

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"David Wilkinson" <no-reply@xxxxxxxxxxxx> wrote in message
news:uyPZa0IxHHA.3652@xxxxxxxxxxxxxxxxxxxxxxx
David:

I said that: if the data is persisted by the application, the handler
should be in the application.

But you are right: if there are multiple views requiring the information,
the information should be in the document, and the handler for setting it
should be in the document.

I guess I feel that wherever the data is located, that class should have
the handler for setting it. And if a class is responsible for persisting
the data, it should have the data as a member.


I agree with everything but the last paragraph. The document may have a
data member (seen by multiple views), but each view may have unique ways of
setting the data member. Like the HTML editor in Visual Studio, you can
change the HTML document in both Code and Design views. The HTML is stored
in the document, but the views handle the changing of it in different ways:
the Code view allows me to type tags, etc., and the Design View lets me drag
and drop from a toolbox for various HTML elements. It isn't the document
handling these changes. Or do you mean something different?

-- David


.



Relevant Pages

  • Re: "modern" javascript...
    ... *default* presentation of HTML elements. ... I agree with dhtml, that is only one handler; ... apparent value of "maintainability" etc. ... through a css selector leads to code I don't like. ...
    (comp.lang.javascript)
  • Re: Simpler loading through jQuery
    ... widgets HTML can be added to the page and the delegation just works. ... and AIUI even standards-compliant DOM ... But then I don't see anything odd in attaching event handler to ... `documentElement` and I haven't stumbled upon any problems with it just ...
    (comp.lang.javascript)
  • Re: Problem - Serving web pages on the desktop (SimpleHTTPServer)
    ... and loads an HTML page in a new browser window at the local host ... from StringIO import StringIO ... the handler does in this case. ... Here's my sample directory: ...
    (comp.lang.python)
  • Re: How do I properly pass a parameter to a parameterized event handler in a loop?
    ... That is not Valid HTML. ... What are users without enabled client-side script support going to do with ... The closure created by the method assignment is unused because you are ... object referred to is not longer called as method of the object `handler' ...
    (comp.lang.javascript)
  • Re: [PATCH][RFC] kprobes: Add user entry-handler in kretprobes
    ... I see no reason to save a copy of *regs and pass that to the entry ... And if a handler on i386 uses ®s->esp as the value of the ... stack pointer, ... Multiple kretprobe registration on the same function. ...
    (Linux-Kernel)