Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refresh gets aborted by ZOrder
Message
 
À
14/10/2015 13:18:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows 8
Network:
Windows 2008 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01625937
Message ID:
01625944
Vues:
49
>
>>define class myOtherContainer as Container
>>	add object myLabel as label with Caption = '*', left = 1, top = 1, border=0
>>	procedure Refresh() as VOID
>>		this.myLabel.Caption = IIF(this.myLabel.Caption = '*', 'I', 'R')
>>		Container::Refresh
>>	endproc
>>enddefine
>>
Hi Fabio, program would work well if not for the call to ZOrder, and is not related to caption, the sequence chain is broken, my original problem had nothing to do with a label, I used a label here for demonstration purposes only, in my case the refresh just changed the back color of the container and then changed some properties, but as soon as you have a ZOrder in the refresh of one of the inner objects, the refresh ends abruptely.

Without ZOrder:
Parent Container -> REFRESH()
	Child 1 -> REFRESH() && Does whatever it needs except calling ZOrder(0)
	Child 2 -> REFRESH() && Does whatever it needs except calling ZOrder(0)
	Child 3 -> REFRESH() && Does whatever it needs except calling ZOrder(0)
	...
	Child n -> REFRESH() && Does whatever it needs except calling ZOrder(0)
	
* All childs are refreshed, Hugo is very happy
With ZOrder
Parent Container -> REFRESH()
	Child 1 -> REFRESH() && There is a ZOrder(0) in the Refresh of Child 1

* Refresh finishes, Hugo is ashamed in front of the vice-president of the company!	
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform