Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there code in that method?
Message
De
23/05/2006 10:48:08
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
23/05/2006 04:02:29
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Divers
Thread ID:
01124052
Message ID:
01124260
Vues:
9
>>I'm probably forgetting the obvious, however I'm trying to determine if there is code in a method at runtime. I can use PEMSTATUS to see if the method has changed and find out if there is any code in the object's method, but if there is code in the method of the parent class, PEMSTATUS won't tell me this. I just need to know if there is any code associated with the method anywhere in the hierarchy. I was thinking there was a function to tell you this, but can't think of the name if there is one and the search terms I used in the help file didn't seem to turn up what I wanted.
>>
>>Any suggestions would be appreciated.
>>
>>Russell Campbell
>
>PEMSTATUS(,,0|1) don't support methods.
>
>At design time, without nodebug
>
>x=CREATEOBJECT("c12")
>clear
>FOR k=1 TO ACLASS(acx,x)
>	? k,acx[k],GETPEM(acx[k],"Init")
>next
>MESSAGEBOX(_VFP.StartMode,"Lunax")
>
>DEFINE CLASS c1 as Custom
>	PROCEDURE init
>		return
>ENDDEFINE
>
>DEFINE CLASS c11 as C1
>ENDDEFINE
>
>DEFINE CLASS c12 as C11
>	PROCEDURE init
>		DODEFAULT()
>ENDDEFINE
>
Hey, this is great! I completely forgot that GetPem accepts classname as first parameter, after so many times I used object reference.

And the help for GetPem() actually states that at runtime you can get the class-level code. Now there's only the matter of finding whether there's any code in thisform.cmd1.click() or not.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform