Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cascading Assign bug
Message
De
23/10/2001 14:57:52
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Cascading Assign bug
Divers
Thread ID:
00572229
Message ID:
00572229
Vues:
59
I have had a problem with cascading assign events. See the attacjed code for an example. The first assign executes and then quits!
local lo
clear
lo= createobject('cascader')
lo.changex()
lo.showx()
lo = ''

define class cascader as container
	iMax	=	4
	function init
		local i
		for i = 1 to this.iMax
			this.addobject('c'+transform(i),'cobj',i)
		endfor
	endfunc

	function changex
		set step on
		this.c1.x = 2

	function showx
		local lxobj, i
		for i = 1 to 4
			lxobj = evaluate('this.c'+transform(i))
			? 'this.c'+ transform(i) +'.x = ' + transform(lxobj.x)
		endfor

enddefine

define class cObj as custom
	x	=	0
	i	=	0

	function init
		lpara tni
		this.i = tni
	endfunc

	function x_assign
		lparameters txVal
		local lxobj
		this.x= txVal
		if this.i < this.parent.iMax
			lxobj =	evaluate('this.parent.c'+transform(this.i+1))
			lxobj = lxobj.x + (2 * this.x)
		endif

enddefine
Anyideas? Bug or Feature?

Glenn
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform