Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Anyone seen this one?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00442281
Message ID:
00442314
Vues:
8
Hi George,

I've had times when method code got corrupted and appeared to have been replaced with compiled code. This seemed to happen only if I had two or more forms or visual classes open for editing at the same time, and I was switching back and forth between them repeatedly. Any chance you might have been doing this too?

I could never reproduce this problem reliably, though, so I was willing to believe I may have caused it myself through some fumble-fingered mistake. In any case it's now a personal rule not to open more than one at a time for editing.

>This has happened all of a sudden and, fortunately, I have a back-up. What's happened is that for some reason the class designer is slightly skewing the methods in a custom class. The code below shows what I see in the method editing window. The comment below doesn't exist and has been placed there for clarity. The portion in bold is of note.
LPARAMETER pcPattern
>
>LOCAL lcPattern, lcresult, lni,;
>  lnlast
>lcPattern = ""
>lcresult = SPACE(26)
>IF PCOUNT() = 0
>  IF NOT EMPTY(This.cPattern)
>    lcPattern = This.cPattern
>  ENDIF
>ELSE
>  lcPattern = pcPattern
>ENDIF
>IF NOT EMPTY(lcPattern)
>  lcPattern = UPPER(lcPattern)
>  lnlast = LEN(lcPattern)
>  FOR lni = 1 TO lnlast
>    lcchar = SUBSTR(lcPattern, lni, 1)
>    IF NOT lcchar $ lcresult
>      lcresult = STUFF(lcresult, ASC(lcchar) - 64, 1, lcchar)
>    ENDIF
>  NEXT
>ENDIF
>lcresult = ALLTRIM(lcresult)
>RETURN lcresult
>
><B>ENDPR</B>
>* Next method - an _assign method
><B>TER vNewVal</B>
>
>LOCAL lnfeed
>lnfeed = vNewVal
>IF NOT BETWEEN(lnfeed, 1, 3)
>  lnfeed = 0
>ENDIF
>This.FlagAssignment(lnfeed, YARNFEED_TYPE)
>This.nYarnFeed = m.vNewVal
>RETURN
>
><B>ENDPR</B>
I've verified by using and browsing the class as a table that all is well within the class itself. The code generated by the class browser looks fine too. But it isn't just these two method, everything else following shows similar symptoms. No changes to the class have been made to-day, but the class has been opened. The backup doesn't display anything like this.
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform