FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour TPrinter:Preview() method
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
TPrinter:Preview() method
Posted: Sat Feb 18, 2006 04:43 PM
Is it right that TPrinter:Preview() method

METHOD Preview() INLINE If( ::lMeta .and. Len( ::aMeta ) > 0 .and. ::hDC != 0,;
                               RPreview( Self ), ::End() )


calls ::End() if ::lMeta is .F.? If I'm not wrong, it seems that it calls ::End() a second time inside PrintEnd() function:

FUNCTION PrintEnd()

     IF oPrinter:lMeta
          oPrinter:Preview()
     ELSE
          oPrinter:End()
     ENDIF

     oPrinter := nil

RETURN nil


EMG
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
TPrinter:Preview() method
Posted: Sun Feb 19, 2006 10:15 AM

Enrico,

Class TPrinter Method End() checks if ::hDC != nil so it should not be a problem to call it twice.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
TPrinter:Preview() method
Posted: Sun Feb 19, 2006 11:19 AM

Yes, you are right. Sorry for the false alarm.

EMG

Continue the discussion