Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
On selection bar
Message
 
 
À
22/02/2005 10:26:21
Suhas Hegde
Dental Surgeon
Sirsi, Inde
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de menu & Menus
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
00989239
Message ID:
00989246
Vues:
16
(alltrim(table1.f1)) is the Name Expression and it's properly used in place of Popup Name. Use of (alltrim(table2.command1)) is invalis because FoxPro doesn't expect a name but a command. Only macro substitution is appropriate here.
lcOnSelCommand = alltrim(table2.command1)
on selection bar m.ix of (alltrim(table1.f1)) &lcOnSelCommand
IOW, the Name Expression can only be used where FoxPro expects a name.

>
>I want to achieve the following.
>
>
>For m.ix = 1 to ..
> define bar m.ix of (alltrim(table1.f1)) prompt (alltrim(table2.f1))
> on selection bar m.ix of (alltrim(table1.f1)) (alltrim(table2.command1))
>endfor
>
>
>The line "on selection bar m.ix of (alltrim(table1.f1)) (alltrim(table2.command1))" fails.
>If i remove the "(alltrim(table2.command1))" it works but it will be of no use to me.
>(alltrim(table2.command1)) contains valid foxpro command like do abc.prg
>
>but this works
>on selection bar m.ix of (alltrim(table1.f1)) do abc.prg
>
>error returned unrecognised command verb .
>I tried macro substitution like
>
>m.macro1 = "on selection bar"+alltrim(str(m.ix))+" of "+alltrim(table1.f1)+alltrim(table2.command1)
>¯o1
>
>and it worked
>
>Can someone highlight why didnt this work ??
>
>on selection bar m.ix of (alltrim(table1.f1)) (alltrim(table2.command1))
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform