Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class - width - cursor/relation
Message
 
To
03/11/2006 05:30:07
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01166838
Message ID:
01166849
Views:
15
They both geives me error in VFP9

>>What do you expect to happen? Neither width nor height are available properties for these classes!
>
>I knew I would get an answer like this.
>
>They may not be 'available', but they can be defined
>
>The thing is, why does it work with a relation and gives an error on a cursor class ?
>________________
>>>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
>>>
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform