>>buffer = FILETOSTR('Label.txt')
>>oComm.output = buffer
>>
>>will work with small files, or you can use low-level file I/O to read a line at a time from the file and stuff it out the control - you'll need to make sure to send CR/LFs if you read a line at a time from the file.
>
>
>I will first try the file to string first. Otherwise this is what is getting written to the file:
>
> =Fput(gnErrFile, CHR(2)+CHR(76)+CHR(87)+CHR(72)+CHR(16)+CHR(13) )
> =Fput(gnErrFile, "1X1100000000005B443225002002"+CHR(13))
> =Fput(gnErrFile, "1X1100001120005L448002"+CHR(13))
>
>So changing the fput to a oComm.output shouldn't be tough. You just cant call a proc inside a method, and I hate writing another method for that output call.
>
Why not? As long as the procedure can be found, you should be able to call UDFs from within an object - I do it all the time since many of my classes are non-visual and the class definitions are in procedure files. You can't rely on using "this", "thisform", etc, but you can always pass object refs as a parameter...
Try this: Create procedure file called TURNBLUE.PRG
*TurnBlue.PRG
LPARAMETER oThis
othis.forecolor = RGB(0,0,255)
Take a form and add the following to some control's Click() method:
*RandomControl Init
=Turnblue(this)
run your form - when you click that control, the function will fire and change the forecolor.