Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
ReadMethod syntax
Message
De
16/12/1998 12:24:46
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
16/12/1998 10:12:45
Larry Long
ProgRes (Programming Resources)
Georgie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00168044
Message ID:
00168123
Vues:
30
>Does the ReadMethod only work for methods belonging to the current object? If I am on an object, I can read the object's Init method by issuing...THIS.READMETHOD("Init"). If I try to read another method or put any kind of path (i.e."Thisform.ThatObject.Init") in the ReadMethod parameter it always returns a "not a property or method" message.
>Also, I would like to read the baseclass methods. If I can call the baseclass method by issuing a BASECLASS::METHOD statement, then I would think that the ReadMethod should be called by issuing THIS.READMETHOD("BASECLASS::METHOD").
>//:^0
>TIA
Larry,
Try like :
Thisform.ThatObject.ReadMethod("Init")
And if you really need something for reading superclass method then this could be a base :
lParameters tcMethod, toObject
with toObject
	select methods from (.classlibrary) ;
		where objname == lower(.class) ;
		and class == lower(.parentclass) ;
		and baseclass == lower(.baseclass) ;
		into array myArray
endwith	
lnProcStart = at("PROCEDURE "+upper(tcMethod),upper(myArray[1]))
lcMethodCode = ""
if lnProcStart > 0
   lcMethodCode = substr(myArray[1],lnProcStart)
   lnMethodEnd = max( at("ENDPROC",upper(lcMethodCode))+len("ENDPROC"),;
   		at("PROCEDURE",upper(lcMethodCode),2)-1)
   if lnMethodEnd = 0
   		lnMethodEnd = len(lcMethodCode)
   endif
   lcMethodCode = substr(lcMethodCode,1,lnMethodEnd)
endif
This needs accessibility to vcx (set excl off) and vcx contain the code (not cleaned up after compiling) and assumes standart vcx structure. Hope helps.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform