Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to process instance of class
Message
From
06/01/2005 18:01:17
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
05/01/2005 17:42:28
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00974523
Message ID:
00974876
Views:
21
>Yes, but how do I reference a member in code? With a subscript of some sort? And if it is a case of a custom class, what is the collection a collection of? Suppose I have cl_xyz, an instance of a clss with 2 properties and 2 methods. How do I loop thru cl_xyz to get the names of the properties and their values? Here is what I want to do:
>
>for i = 1 to count of members
> if member[i] is a property
> variable1 = property name
> variable2 = property value
> else
> no action
> endif
>next
for ix=1 to amember(aMemberObjects,oObject,2) && Only object members
endfor

for ix=1 to amember(aMemberPEMs,oObject,1) && All PEM
if lower(aMemberPEMs[m.ix,2]) = "property"
? "Property name:", aMemberPEMs[m.ix,1]
endif
endfor
REading the value you might need to take extra steps depending on version. Check PEMstatus.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform