Abstract: An improved document processing system for creating computer procedures (i.e., methods) and associating them with an electronic document structured as a nested hierarchy of constituent objects. The system includes a document processing means for creating the electronic document, and a program creating means for defining the method and associating it with the electronic document or its lower level constituent objects. The system further includes an interpreter for interpreting the computer procedure in response to a specified event.