Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copying properties of one object to another
Message
De
05/03/2002 04:16:03
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
05/03/2002 04:07:51
Eugene Kolmakov
Millennium Technologies
Vladivostok, Russie
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00628259
Message ID:
00628260
Vues:
15
>Hi all!
>I have an object based on class TextBox. I create another object from my own class based on the same TextBox class. And I need to copy all user-changed or user-defined properties from the first object to my object. Does anybody knows the way I can do this ?
nMembers = amembers(aPEM,oObjectName,1)
	\*	Properties :
	\*--------------------------------------------------------------------------------------------------------------------------
For ix = 1 to nMembers
  If aPEM[ix,2]="Property"
    If aPEM[ix,1] = "VALUE"  ;
        and pemstatus(oObjectName, "controlsource", 5) ;
        and type(getpem(oObjectName,"controlsource")) = "G" && Handle general specially
      If pemstatus(oObjectName, aPEM[ix,1], 5) ;
          and !pemstatus(oObjectName, aPEM[ix,1], 2) ;
          and pemstatus(oObjectName, aPEM[ix,1], 0)
		\*	<<padr(aPEM[ix,1],20," ")>>(General)
      Endif
    Else
      If pemstatus(oObjectName, aPEM[ix,1], 5) ;
          and !pemstatus(oObjectName, aPEM[ix,1], 2) ;
          and pemstatus(oObjectName, aPEM[ix,1], 0)
		\*	<<padr(aPEM[ix,1],20," ")>>
		\\ <<getpem(oObjectName,aPEM[ix,1])>>
        If pemstatus(oObjectName,"ReadExpression",5)
          cExpr = oObjectName.readexpression(aPEM[ix,1])
          If !empty(cExpr)
		\\ ( <<cExpr>> )
          Endif
        Endif
      Endif
    Endif
  Endif
Endfor
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform