TPrinter:Preview() method

Post Reply
User avatar
Enrico Maria Giordano
Posts: 7355
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Contact:

TPrinter:Preview() method

Post by Enrico Maria Giordano »

Is it right that TPrinter:Preview() method

Code: Select all

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:

Code: Select all

FUNCTION PrintEnd()

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

     oPrinter := nil

RETURN nil
EMG
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

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
Post Reply