Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MemberData
Message
From
03/06/2004 21:32:55
 
General information
Forum:
Visual FoxPro
Category:
Visual FoxPro Beta
Title:
Miscellaneous
Thread ID:
00909766
Message ID:
00909776
Views:
11
Paul,

>I've created a new form, and see the "Member Data Editor" (MDE) option. It seems to be populated with all the default methods/properties/events. OK, now I want to add my own property (let's say "nSample". I add the property the way I always have, then open the MDE. My custom property isn't there (it seems like it should be).
>
>The info. included says I should be able to do something like this via a _MemberData property. Is this a property I have to manually add (eg. it's not intrinsic to the class, right)?

The Member Data Editor was a very late addition to the beta and there is not much info available yet on its use. Maybe Doug Hennig will chime in here about this -- he is intimately involved with the Member Data Editor and wrote a very detailed article for the June FoxTalk 2.0 issue on the subject (which had to be changed at the last minute due to late-breaking changes added just before the Public Beta freeze).

I have not yet had a chance to download the Public version and see how the Editor works, so I can't give you an answer at the moment. :-(

However, you can add a _MemberData property (don't forget the underscore) to your class and manually populate it with an XML snippet that follows the Member Data Schema. The XML can include as many memberdata elements as you want, each handling a different property, event or method of the class. Here is an example of such an XML snippet (not all attributes are required).

From Doug's article:

Here’s an example specifying that the property mycustomproperty should be displayed as MyCustomProperty and should appear in the Favorites tab of the Properties window, and VFP should call MyCustomPropertyEditor.PRG when you click on the property editor button in the Properties window.
<?xml version = "1.0" encoding="Windows-1252"
standalone="yes"?>
<VFPData>
<memberdata
name="mycustomproperty"
type="property"
display="MyCustomProperty"
favorites="True"
override="False"
script="DO MyCustomPropertyEditor.PRG"/>
</VFPData>
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Reply
Map
View

Click here to load this message in the networking platform