Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Design time re-size
Message
De
18/06/2009 11:04:16
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01406083
Message ID:
01406878
Vues:
51
Naomi --

Absolutely sure ... it was absolutely repeatable ... stop the code before the offending statement, the universe works as you expected. Step though that one line of code
For each loObject in .Objects FoxCode
and you can see the odd name appearing in the Property Window and then you get blown away regardless of what your next step is.

Replacing this statement with alternative (equivalent) code made the C5 errors disappear immediately.

I have known about avoiding the With ... Return ... EndWith construction for some time. It creates a latent bug which doesn't show up till later in your session, if at all.


>>Naomi --
>>
>>Turns out that even with FoxObject you can still get C5 errors.
>>
>>Thus, I do not use the construction
For Each loObject in Objects FoxObject
. If you browsed my code, you'll see that instead I use a counter and an index ...
		For lnI = 1 To lnCount
>>		loChild = loParent.Objects(lnI)
>>
>>I have found in writing PEMEditor that For Each loObject in Objects FoxObject can create C5 errors -- in fact, demonstrating this was kind of interesting. In my instance, I would stop my code on this statement, and then do anything I wanted, as I would at any time in the IDE. After executing the statement, I could observe that a new oddly named property was created in the Property Window ("_NewENum") and then clicking on just about anything else in my session would crash VFP.
>>
>>When I removed this type of looping from PEMEditor, all C5 errors happily disappeared.
>>
>>Of course, the loop I'm using is a little more cumbersome, since I have to determine the number of items, but that's a small price to pay.
>>
>>
>
>Are you sure it's not WITH /ENDWITH with return problem - documented in Doug H. blog?
>
>It's probably one of the strange obscure bugs we have to live with.
>
>For instance, just a minute ago my colleague asked me to look at his code. There were long replace commands (or long commands that span multiple lines) and they turn green in designer from time to time. I've seen this behavior myself before, so I just told him to not worry and ignore it.
>
>The other problem I found when I was trying to use HeaderClass. In one project it worked OK after I made sure the files (prg and pictures) were not read-only.
>
>
>
>In another project VFP crashed every time - so finally I simply did it in code and that solved the problem.
Jim Nelson
Newbury Park, CA
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform