Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Getting mixed case from _memberdata
Message
 
À
29/09/2008 09:47:05
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Divers
Thread ID:
01351478
Message ID:
01351534
Vues:
10
>Is there some simple way, given the name of an object, to find its full mixed-case name from _memberdata?
>
>What I'm asking does not have to do with Intellisense -- instead, I have a variable lcObjectName (something like 'NUMBEROFBARS') and would like to extract from Memberdata the mixed case name ("NumberOfBars").

There is no simple function call that will do this for you. You have to parse the _Memberdata property yourself to get the Display value.

If the object is selected in the designer, you can use something similar to this to get a list of members and Display values
IF ASELOBJ(a) > 0
   XMLTOCURSOR(a[1]._memberdata)
   BROWSE LAST NOWAIT
ENDIF
If you are trying to parse memberdata for a control that is not instatiated or visible in the designer, you can extract it from the VCX using code similar to this
USE ("myclasslib.vcx") ALIAS myclass IN SELECT("myclass")
LOCATE FOR objname = "myclass" AND EMPTY(parent)
IF FOUND()
  lcMemberData=STREXTRACT(properties,"_memberdata = ",CHR(13))
  IF LEFT(lcMemberData,1) = CHR(1)
    lcMemberData = SUBSTR(lcMemberData,517+8+1)
  ENDIF
  XMLTOCURSOR(lcMemberData)
  BROWSE LAST NOWAIT
ENDIF
USE IN SELECT("myclass")
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform