Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Unique Cursor Names
Message
De
10/01/2001 18:20:23
 
 
À
09/01/2001 09:41:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00461047
Message ID:
00461985
Vues:
13
>>Whenever I use more than 1 class on a form
>If you're using private data sessions, you won't have any problem.

Unless he uses more than 1 class on a form.

Kevin, typically, I power all my Combos and Lists with an array property like Evan and Walter do called "aItems" and its setup as teh default RowSource in the base class. But what you're trying to do should work. The only times it wouldn't is when you're using an invalid cursor name (but since its an object name, I can't think of when that might be the case) or when yuo have two objects with the same name on a form (for example, Page1.txtName and Page2.txtName).
oFOrm = CREATEOBJECT('myform')
DEFINE CLASS myform as form
	PROCEDURE init
	SELECT * FROM reports INTO CURSOR (this.Name)
	ENDPROC 
ENDDEFINE
Like I said, this can have a problem with duplicate control names, so, if you don't need the cursor around, use an array property of the control, otherwise, something like this:

lcCursor = sys(2015)
SELECT * FROM table INTO CURSOR (lcCursor)
this.RowSource = lcCursor
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform