It is a good principle in 4D to ensure that your objects and forms only have the form events activated that they need.
4D's Technical Support saw a good illustration of this principle recently. A caller was confused because a very simple output layout with a Print button in the footer was generating an error after the first page was spooled. The method in the button was a single line:
The default output form was the very form containing the button. The error
message the caller saw was:
This command cannot be used because a record of the table is in a form.
The problem was that the print button had its On Printing Header event turned on. So in the middle of the print job, the method was firing off again, and trying to start the print job again. No wonder 4D was confused!
Another good principle is to always check your form event. If the object
method did this:
if (form event=on clicked)
there would have been no problem either.