Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
101 VFP Things, Part 7
Message
De
11/12/2000 12:01:56
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
101 VFP Things, Part 7
Divers
Thread ID:
00451655
Message ID:
00451655
Vues:
80
There is a new function called AStackInfo() that fills an array with info about the entire calling stack. THe first column is the calling stack number, 2 is the current Program, 3 and 4 are the Object and the Object source filename (Larry, I think this is another way to get the Instance name of "THIS"), then the line number, and if avaialble, the source.

It shoudl be pretty helpful in debugging, whenever an error occurs, you could dump this bad boy to a text file or something to be able to look at the big picture a little better.

Here's an example from the Documentation:
ASTACKINFO(myarray)
DISPLAY MEMO LIKE myarray
myArray
(1,1)   1                                    && Stack level = 1
(1,2)   c:\vfp\myAppl.app                        && Current program
(1,3) frmRerport.PrintReport.Click         && Object
(1,4) c:\vfp\myclasses\buttons.vct         && Object source file name
(1,5) 42                              && Line number in the source 
(1,6) THISFORM.DoReport()                  && in the source 
(2,1)   2                                    && Stack level = 2
(2,2) c:\vfp\myAppl.app
(2,3) frmRerport.DoReport
(2,4) c:\vfp\forms\frmRerport.sct         && Module source file name
(2,5) 31
(2,6) DO RunListReport                     && in the source 
(3,1)   3                                    && Stack level = 3
(3,2) c:\vfp\myAppl.app
(3,3) 
(3,4) c:\vfp\programs\runlisterport.prg   && Module source file name
(3,5) 12
(3,6) REPORT FORM myreport1.frx            && in the source 
(4,1)   4                                    && Stack level = 4
(4,2) c:\vfp\reports\myreport1.frt
(4,3) myreport1.DataEnvironment.BeforeOpenTables
(4,4) c:\vfp\reports\myreport1.frt          && Module source file name
(4,5) 31
(4,6) DO FORM getcusts                     && in the source 
(5,1)   5                                    && Stack level = 5
(5,2) c:\vfp\myAppl.app
(5,3) getcusts.init
(5,4) c:\vfp\forms\getcusts.sct            && Module source file name
(5,5) 2
(5,6) ASTACKINFO(myarray)                  && in the source 
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform