Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copy Method Utility?
Message
De
30/01/2017 16:03:39
Joel Leach
Memorial Business Systems, Inc.
Tennessie, États-Unis
 
 
À
30/01/2017 12:37:14
Joel Leach
Memorial Business Systems, Inc.
Tennessie, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
Divers
Thread ID:
01647168
Message ID:
01647200
Vues:
44
I couldn't find a function, so I ended up parsing the method description out of the Reserved3 field in the VCX.

>Thanks. That was very helpful, and I was able to cobble together a utility for it. The only thing I am missing is the method description. There is a parameter in WriteMethod() to include the description, but I can't find how to get it from the original class/method. Is there a function for that?
>
>>>Does anyone know of an existing utility that will copy a method from one class to another? I am splitting up a large class with many methods into multiple classes. I figured something like this would be in Thor/PEM Editor, but I could not find it.
>>
>>The quick and dirty way is to create a copy and then delete the stuff you don't need. Or you can edit the source class, create a reference using aselobj() and then oRef.SaveAsClass(oref.ClassLibrary, "newName") (assuming it will go into the same classlib), or create a new class, get a reference to it the same way, and then
>>
>>oRefToNew.writemethod("methodname", oRef.GetPem("methodname"), .t.)
>>
>>(the third parameter is needed if you're adding a custom method)
>>
>>In the case of .saveAsClass() and a new/different classlib, make sure that you use a path in the filename or else it may create it in the current folder.
Joel Leach
Microsoft Certified Professional
Blog: http://www.joelleach.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform