Problem: 1615820

Title: (Printing) TPrintHandler::SetOwner

Received: Dec 29 1996 3:47PM


For MacApp 3.3 (final, from the latest MPW Pro CD)...

In TPrintHandler::SetOwner, for debug builds, if fOwner != fView then DebugStr is called, which is very annoying when using the Metrowerks Debugger from CW7 becayue each call to DebugStr causes a the debugger to bring up a MODAL dialog! This happens way too much when printing from my Application, which has a custom print handler.

My question to you is, do these two fields really need to be the same? If so, why? Why not get rid of one of them?


A continuation of my previous message...

In TPrintHandler::SetOwner, it must be bogus for it to generate an error message if fOwner != fView because...

In TStdPrintHandler::IStdPrintHandler it calls IPrintHandler which sets fView to itsView, and then down a little bit this happens:

   if (itsDocument)
    itsDocument->AttachPrintHandler(this);
Which eventually calls TEventHandler::AddBehavior, which has this line:
  theBehavior->SetOwner(this);
hence normal use of TStdPrintHandler::IStdPrintHandler will result in fOwner !=fView...
Fix:

The ProgramBreak statement was removed.