Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting the name of the alias
Message
 
 
À
14/06/2001 13:34:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00519534
Message ID:
00519552
Vues:
19
This message has been marked as the solution to the initial question of the thread.
Michel,
Instead of getting the members of the object, why not access the Alias property directly.
<b>local locursor
IF AMEMBERS(laCursor,ThisForm.DataEnvironment,2)>0
   FOR lnCompteur=1 TO ALEN(laCursor)
      locursor = EVAL("ThisForm.DataEnvironment."+laCursor[lnCompteur])
      if vartype(locursor) = "O" ;
         and upper(locursor.BaseClass) = "CURSOR" then
         * object is not a relation so you can
         * process Alias property of locursor object
      endif
   NEXT
ENDIF
HTH.

>I'm looking for the easiest way to detect the name the alias of all my cursor in the data environment.
>
>I have something like this to scroll thru all the entries:
>
>
>IF AMEMBERS(laCursor,ThisForm.DataEnvironment,2)>0
>   FOR lnCompteur=1 TO ALEN(laCursor)
>      lcExec='ThisForm.DataEnvironment.'+laCursor[lnCompteur]
>      =AMEMBERS(laCursor2,&lcExec)
>      IF laCursor2[1]='ALIAS'
>         * We have an alias
>         * We can add the code here to do some process
>      ENDIF
>   NEXT
>ENDIF
>
>
>So, basically, is that the proper approach? Also, once I am on an alias, what is the easiest way to detect the alias name?
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform