Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Find a flaw in the logic
Message
From
12/01/2006 09:32:06
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01086027
Message ID:
01086032
Views:
17
Even if you set toObject = this in your code, toObject will not be expanded in your program.

>Hi everybody,
>
>Ok, Fabio, Sergey and Cetin - please, don't answer, I know you can find this in a second.
>
>Here is a piece of code - please find why this is wrong: <g> I'm wondering how can I be that stupid <g>
>
>
>*---------------------- Location Section ------------------------
>*   Library: 	Aforms.vcx
>*   Class: 		Cntdataentry
>*   Method: 	Setenabledstatus()
>*----------------------- Usage Section --------------------------
>*)  Description:
>*)
>
>*   Scope:      Public
>*   Parameters:
>*$  Usage:
>*$
>*   Returns:
>*--------------------- Maintenance Section ----------------------
>*   Change Log:
>*       CREATED 	11/04/2005 - NN
>*		MODIFIED
>*----------------------------------------------------------------
>lparameters tlEnabled, toObject
>
>if vartype(m.toObject) <>"O"
>	toObject = this
>endif
>
>local lnI, lcBaseClass, loObject
>local array laIgnoreClasses[1]
>store space(100) to laIgnoreClasses[1]
>alines(laIgnoreClasses, this.cClassFilter,", ")
>
>for each m.loObject in m.toObject.objects
>	if not ascan(laIgnoreClasses,upper(m.loObject.baseclass)) > 0 ;
>	AND NOT upper(m.loObject.parentclass) = [ABIZOBJ]
>		if pemstatus(m.loObject, "OBJECTS", 5) && Container object
>			this.SetEnabledStatus(m.tlEnabled, m.loObject) && Call the method recursively
>		else
>			if pemstatus(m.loObject, "Enabled", 5)
>				m.loObject.enabled = m.loObject.enabled and m.tlEnabled
>			endif
>		endif
>	endif
>next
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform