TPrinter:Preview() method

TPrinter:Preview() method

Postby Enrico Maria Giordano » Sat Feb 18, 2006 4:43 pm

Is it right that TPrinter:Preview() method

Code: Select all  Expand view
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  Expand view
FUNCTION PrintEnd()

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

     oPrinter := nil

RETURN nil


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Postby Antonio Linares » 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
User avatar
Antonio Linares
Site Admin
 
Posts: 42074
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Enrico Maria Giordano » Sun Feb 19, 2006 11:19 am

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

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8710
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 79 guests