Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DEFINE CLASS, array as property??
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
DEFINE CLASS, array as property??
Miscellaneous
Thread ID:
00958956
Message ID:
00958956
Views:
47
I want to add an array as a property to a programmtically defined class.
How do I do it? When I try to define a property it sees it as a character, such as:
DEFINE CLASS BizObj as Session
	DataSession	= 2

	cTable		= ''
	cAlias		= ''
	cPkField		= ''
	oData		= ''
	aList		= [1]  &&I want an array where but the brackets = character
	
	PROCEDURE LoadTable
		LPARAMETERS lcTable, lcAlias, lcPkField
		
		IF EMPTY(lcAlias) OR EMPTY(lcTable) OR EMPTY(lcPkField)
			RETURN .f.
		ENDIF 
		
		IF !USED(lcAlias)
			USE (lcTable) IN 0 ALIAS (lcAlias) ORDER (lcPkField)
		ENDIF  
		
		this.cAlias = lcAlias
		
		SELECT (lcAlias) 
		SCATTER NAME this.oData MEMO 
		
		SELECT * from (this.cAlias) INTO ARRAY this.aList
	ENDPROC 
ENDDEFINE 
What am I doing wrong??
Woodie Westbrook
I came, I saw, I compiled.
Next
Reply
Map
View

Click here to load this message in the networking platform