Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why 'Thisform can only be used in method' error?
Message
 
 
À
30/06/2003 15:25:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00805151
Message ID:
00805470
Vues:
36
Jim,

I haven't tried this just yet, but if you subclass the combo and declare a method for it (say, SetRowSource()), and then wrap the SQL in this method, you should be able to write =THIS.SetRowSource() in the property sheet for the RowSource property or (for sure) from the Init() of the instance of the combo.

In some areas the behavior of the combo box has changed considerably since VFP 3.0, and your post has given me an idea for a future presentation at our VFP SIG here in Portland. There's certainly enough material for a rather lengthy article. VFP's documentation, even though it could be more helpful in places, is still vast. Unfortunately, the VFP community doesn't have any references like Charles Petzold's classic texts on Windows programming in C (and now C# and VB.NET), although the Hacker's Guides come the closest. Petzold is a thoughtful and articulate writer who is very good at pointing out the gotchas before they are gotchas. :)

John
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform