Problem with PRINTER class ???

Problem with PRINTER class ???

Postby driessen » Thu May 29, 2008 4: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 :
Code: Select all  Expand view  RUN
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 :
Code: Select all  Expand view  RUN
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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Postby James Bott » Thu May 29, 2008 6:12 pm

Michel,

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

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

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

Postby James Bott » Thu May 29, 2008 7:04 pm

Michel,

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

James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Postby driessen » Thu May 29, 2008 7: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. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 58 guests