Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting mixed case from _memberdata
Message
 
To
29/09/2008 09:47:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01351478
Message ID:
01351534
Views:
11
>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")
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform