Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any way to Remove Method ?
Message
From
29/01/2003 14:10:29
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00746719
Message ID:
00746833
Views:
16
Hi Nadya,
One more question.
When I "Create Class myClass", it opens the Class Designer. Do you know how to programically close it, so I can hack the classlib?
Or maybe how to create a class without opening the Class Disigner?


>Hi Bill,
>
>You don't have to touch objcode (that's why I said about compile classlib after words). You're right, the Reserved3 field should be checked and Methods field as well.
>
>I recall I did some hacking (but usually I add methods, not remove them).
>
>
>>Hi Nadya,
>>Thanks for trying. It was a nice idea.
>>Unfortunately, there isn't a record for each member of the class, just 2 records for the class. And there are 3 fields in just 1 of the records that contain a reference to the method. 1 of them is "Reserved3" and I wouldn't want to count on that one staying static. And 1 of them is "Objcode" and I wouldn't trust that I could accurately remove just the code for the method I want. It would be my luck that it has a checksum somewhere which would really screw me up.
>>
>>
>>>Hack classlib (field methods), then compile classlib. Do it manually first to see, how it works.
>>>
>>>>I'm using VFP 7.0
>>>>
>>>>Does anyone know of a way to programically remove a method from a class?
>>>>The only thing I can think of is to create a new class, copy all the methods from the old class (except the one I want to remove), remove the old class from the vcx, and rename the new class to the old name.
>>>>
>>>>Is there a better way?
>>>>
>>>>TIA
Bill Morris
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform