Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copying PEMs
Message
De
19/07/2002 13:12:57
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Copying PEMs
Divers
Thread ID:
00680539
Message ID:
00680539
Vues:
59
If I want to copy all the Non Default PEMs from one object to another, do I need to consider anything else?
PROCEDURE Copy_Changed_PEMs(toSource,toDest)
  IF VARTYPE(toSource)<>'O' ;
      OR VARTYPE(toDest)<>'O'
    RETURN
  ENDIF

  LOCAL laSource(1), lnRow, lcMember, lcPEM, lcExpression
  = AMEMBERS(laSource,toSource,1,'C+#')
  FOR lnRow = 1 TO ALEN(laSource,1)
    lcMember = laSource(lnRow,1)
    lcPEM = laSource(lnRow,2)
    DO CASE
      CASE lcPEM = 'Property'
        IF lcMember <> 'NAME'
          lcExpression = toSource.READEXPRESSION(lcMember)
          IF !EMPTY(lcExpression)
            toDest.WRITEEXPRESSION(lcMember,lcExpression)
          ELSE
            toDest.&lcMember = toSource.&lcMember
          ENDIF
        ENDIF
      CASE lcPEM = 'Method' ;
          OR lcPEM = 'Event'
        toDest.WRITEMETHOD(lcMember,toSource.READMETHOD(lcMember))
    ENDCASE
  ENDFOR
Bill Morris
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform