FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Problem with PRINTER class ???
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Problem with PRINTER class ???
Posted: Thu May 29, 2008 04:43 PM
I noticed a slight difference in the PRINTER class in FWH 8.05 and the previous versions.

Source in PRINTER class in FWH 8.05 :
function SetPrintDefault( cModel )

   local cDriver := StrToken( GetProfString( "Devices", cModel, "" ), 1, "," )
   local cPort   := StrToken( GetProfString( "Devices", cModel, "" ), 2, "," )

   WriteProfString( "Windows", "Device", cModel + "," + cDriver + "," + cPort )

return nil


Source in PRINTER class in previous versions :
function SetPrintDefault( cModel )

   local cDriver := StrToken( GetProfString( "Devices", cModel, "" ), 1, "," )
   local cPort   := StrToken( GetProfString( "Devices", cModel, "" ), 2, "," )

   WriteProfString( "Windows", "Device", cModel + ",", + cDriver + "," + cPort )

return nil


There is a slight difference in the function "WriteProfString". Notice an extra comma behind <cModel + ",",>.

What is the right code ?

Thanks.

Regards.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Problem with PRINTER class ???
Posted: Thu May 29, 2008 06:12 PM

Michel,

My version of PRINTER.PRG from ver 8.05 does not have the extra comma. Perhaps yours is corrupted.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Problem with PRINTER class ???
Posted: Thu May 29, 2008 06:33 PM

Michel,

That fix has been introduced intentionally as WriteProfString() only admits three parameters and we were supplying it four by mistake.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Problem with PRINTER class ???
Posted: Thu May 29, 2008 07:04 PM

Michel,

Ops, my mistake. I thought you had shown the old version first and the new one after.

James

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Problem with PRINTER class ???
Posted: Thu May 29, 2008 07:25 PM

Antonio,
James,

Thanks for your answer.

That's all I wanted to know.

Regards.

Regards,

Michel D.
Genk (Belgium)


_____________________________________________________________________________________________

I use : FiveWin for (x)Harbour v. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Continue the discussion