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:
00442285
Vues:
9
>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
>
>ENDPR
>* Next method - an _assign method
>TER vNewVal
>
>LOCAL lnfeed
>lnfeed = vNewVal
>IF NOT BETWEEN(lnfeed, 1, 3)
>  lnfeed = 0
>ENDIF
>This.FlagAssignment(lnfeed, YARNFEED_TYPE)
>This.nYarnFeed = m.vNewVal
>RETURN
>
>ENDPR
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.

Sounds like the compiled code in there got screwed up. This ought to fix it.
I don't have to tell you, but for the lurkers backup first
USE myvcx.vcx
BLANK FIELD objcode ALL && not methods
USE
COMPILE CLASS myvcx


How it got screwed up is another question - maybe the compile hiccupped when the class was saved.
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform