Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unique Cursor Names
Message
From
10/01/2001 18:20:23
 
 
To
09/01/2001 09:41:14
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00461047
Message ID:
00461985
Views:
11
>>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
Previous
Reply
Map
View

Click here to load this message in the networking platform