Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Anders Altberg
  Where is Anders Altberg?
 Uppsala
 Sweden
 Anders Altberg
 To: Victor Friedman
  Where is Victor Friedman?
 Moscow
 Russia
 Victor Friedman
 Tags
Subject: RE: SCATTER NAME object
Thread ID: 373379 Message ID: 373383 # Views: 57 # Ratings: 2
Version: Visual FoxPro 9 SP2 Category: Classes and Objects
Date: Thursday, March 21, 2013 8:46:36 PM         
   


> Hello All!
>
> The question may look rather dumb, but here it is. If I create an object using SCATTER NAME, is there a way to loop through the "properties" of this object (i.e. fields)? In other words, I need to go through the fields one by one, to perform certain operations, but can't seem to find a way to do it. It seems that the FOR EACH loop does not work here. Any ideas?
>
> Thank in advance!
>
> --Vick

You can use n=AMEMBERS(arr, object) or AMEMBERS(array,object, 1)
AMEMBERS returns the number of properties + an array of the property names.
-Anders

ENTIRE THREAD

SCATTER NAME object Posted by Victor Friedman @ 3/21/2013 8:28:33 PM
RE: SCATTER NAME object Posted by Anders Altberg @ 3/21/2013 8:46:36 PM
RE: SCATTER NAME object Posted by Victor Friedman @ 3/21/2013 8:48:38 PM