Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class - width - cursor/relation
Message
From
03/11/2006 04:04:41
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Class - width - cursor/relation
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01166838
Message ID:
01166838
Views:
57
Something funny I've come across

If you have a class based on cursor, avoid the Width property (Height as well)
xxx = createobject('test1', 20)
xxx = createobject('test2', 20)

define class test1 as cursor

	width = 0
function init( Width )
	
	this.Width = min(m.width, this.Width) && error here
	?this.Class, this.Width
	
endfunc
enddefine

define class test2 as relation

	width = 0
function init( Width )
	
	this.Width = min(m.width, this.Width)	&& no error here
	?this.Class, this.Width
endfunc
enddefine
Gregory
Next
Reply
Map
View

Click here to load this message in the networking platform