problem with .readmethod() 
Author Message
 problem with .readmethod()

Help!  To convince my boss that it would be better to do our monthly
processing in 5.0 classes instead of 2.6 prg's, I need to be able to backup
the code that did the processing for auditing purposes.  I tried to copy the
VCX and VCT, but that bombed at runtime, so I thought I could use the
readmethod() function to copy the code to a variable and then write the
variable contents to a file.  However, when it gets done, I have a file with
just a carriage return and line feed in it.  Please help.  Here's the code
section I'm using:

    * try to backup this procedure for auditing
    lcNewFile = lcNewDir + "run_click.prc"
    lnHandle = fcreate(lcNewFile)
    lcmethod = this.readmethod("click")
    a = fput(lnHandle, lcMethod)
    a = fclose(lnHandle)

Thanks,
Bill



Sun, 27 Aug 2000 03:00:00 GMT  
 problem with .readmethod()

Hi Bill,

Could you, as long as the class wasn't loaded, use the class as a table and
dump the method code that way?

local  sMethodString

use myclass.VCX alias class

locate for MyProc $ objname
sMethodString = class.methods

? sMethodString

--
Donald


Quote:
>Help!  To convince my boss that it would be better to do our monthly
>processing in 5.0 classes instead of 2.6 prg's, I need to be able to backup
>the code that did the processing for auditing purposes.  I tried to copy
the
>VCX and VCT, but that bombed at runtime, so I thought I could use the
>readmethod() function to copy the code to a variable and then write the
>variable contents to a file.  However, when it gets done, I have a file
with
>just a carriage return and line feed in it.  Please help.  Here's the code
>section I'm using:

>    * try to backup this procedure for auditing
>    lcNewFile = lcNewDir + "run_click.prc"
>    lnHandle = fcreate(lcNewFile)
>    lcmethod = this.readmethod("click")
>    a = fput(lnHandle, lcMethod)
>    a = fclose(lnHandle)

>Thanks,
>Bill



Sun, 27 Aug 2000 03:00:00 GMT  
 problem with .readmethod()



Quote:
> Help!  To convince my boss that it would be better to do our monthly
> processing in 5.0 classes instead of 2.6 prg's, I need to be able to backup
> the code that did the processing for auditing purposes.  I tried to copy the
> VCX and VCT, but that bombed at runtime, so I thought I could use the
> readmethod() function to copy the code to a variable and then write the
> variable contents to a file.  However, when it gets done, I have a file with
> just a carriage return and line feed in it.  Please help.  Here's the code
> section I'm using:

open the class in the class browser, and from there you can print all the
code.

Hoping this helps

Christian Desbourse (Belgium)



Mon, 28 Aug 2000 03:00:00 GMT  
 problem with .readmethod()

Hi Bill,

Try something like this (make sure the class library is active)

lo=CREATEOBJ('yourclassname')
lctext= GETPEM('yourclassname','Click')
RELEASE lo

You can also use Class Browser to create documentation of Classes or Forms.

Best regards,
Tom


Quote:
>Help!  To convince my boss that it would be better to do our monthly
>processing in 5.0 classes instead of 2.6 prg's, I need to be able to backup
>the code that did the processing for auditing purposes.  I tried to copy
the
>VCX and VCT, but that bombed at runtime, so I thought I could use the
>readmethod() function to copy the code to a variable and then write the
>variable contents to a file.  However, when it gets done, I have a file
with
>just a carriage return and line feed in it.  Please help.  Here's the code
>section I'm using:

>    * try to backup this procedure for auditing
>    lcNewFile = lcNewDir + "run_click.prc"
>    lnHandle = fcreate(lcNewFile)
>    lcmethod = this.readmethod("click")
>    a = fput(lnHandle, lcMethod)
>    a = fclose(lnHandle)



Mon, 28 Aug 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. readmethod problem

2. readmethod?

3. Readmethod not work in VFP6 runtime

4. Use of the 'control.ReadMethod' method?

5. AutoCenter problem, Include Problem

6. Grid problem, Listbox problem

7. Is there any USER has problem when using wizard.vcx...?VFP problem

8. Problem: Help Compiling Problem with WHAT6 in Windows 95

9. vfp database code page problem / platform problem

10. Form/grid as class?/Date picker problem/and some other problems

11. Network Problem? or Fox problem?

12. Grid control and views - problems, problems.... / VFP 5.0a

 

 
Powered by phpBB® Forum Software