Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any way to Remove Method ?
Message
 
 
To
29/01/2003 15:10:38
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00746719
Message ID:
00746861
Views:
23
Ok, here is the thread, I was talking about Re: Searching through all application directory... Thread #430305 Message #430691

>Thanks,
>Don't even need the SendKeys, since I'm doing "Create Class ...", then "Release Window Class", no changes have been made. I'll just hack the vcx to put in my changes.
>
>Thanks again.
>
>
>>Here is a program, which partially works (it looks like it sends "Y" key twice), I just don't have time to debug it further and link from Mike Asherman's message (after I ran a search here on SendKeys) brought me to MSDN site (pressing back button on the browser didn't bring me back to UT - so I had to re-log).
>>
>>modify class test of test nowait
>>release window class
>>local wshShell
>>WshShell = CreateObject("Wscript.Shell")
>>
>>WshShell.SendKeys ("Y")
>>
>>>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
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform