Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I cut & paste those?
Message
From
22/05/2001 18:28:07
 
 
To
22/05/2001 17:43:19
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00510106
Message ID:
00510121
Views:
13
This message has been marked as a message which has helped to the initial question of the thread.
>I'd like to be able to cut and paste all the names of the functions and procedures that are in a form.
>
>Is there a fast and easy way to do this?
>
>For example when in the class browser when I right click I can see all of those names. Those are the names that I want to be able to cut & paste.

In the Class Browser, the only methods (and properties) that show up are those custom ones created for that object (i.e., not inherited from a parent object)
To get these:
You could hack the form:
e.g., form named MyForm - only getting custom methods/properties created for that form
Use myform.scx
*-- if this is a formset, look for baseclass="formset"
Locate For baseclass="form" And !Empty(reserved3)
_Cliptext=Alltrim(reserved3)
Use
After you paste it where you want, you'll notice that methods start with a "*". Custom Array properties will start with a "^".

Or, (my preferred method) you could run the form and use AMembers().
Create a PRG called, e.g., CustMethToClip(), and you can use it for classes as well.
e.g. - still get only custom methods
Do Form myform Name oForm
CustMethToClip(oForm)

** CustMethToClip.prg
LPARAMETERS toObject
Local ji, laMem(1), lcPEM, lnMem

_Cliptext=""
lnMem=AMembers(laMem,toObject,1)
For ji = 1 To lnMem
  lcPEM=laMem[ji,1]
  If laMem[ji,2]="Method" And PEMStatus(toObject.Name, lcPEM, 4) && custom method
    If !PEMStatus(toObject.Name, lcPEM, 6) && not inherited
      _Cliptext=_Cliptext + lcPEM + Chr(13)
    EndIf
  EndIf
EndFor
Insanity: Doing the same thing over and over and expecting different results.
Previous
Reply
Map
View

Click here to load this message in the networking platform