Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CRASH: divide by zero
Message
De
12/06/2004 13:35:03
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro Beta
Titre:
CRASH: divide by zero
Divers
Thread ID:
00913043
Message ID:
00913043
Vues:
67
I Ask to me:

With these Anchor Bit Values
- 16,64,512 and Parent.Height = 0
- 32,128,256 and Parent.Width = 0

what VFP can do ?

The possible choices are:

a) fire a Exception number: c0000094 (divide by zero) ( not allowed choice )
b) catch the zero divisor and fire a error for invalid Anchor value ( not a good choice )
c) ignore these Bit values if the Parent AxisSize value is zero ( this is the best choice )
d) set the divisor for Relative Anchoring to a minimum value > 0 ( another interesting choice )

On VFP9 Beta it has not been made and therefore result is a)

Repro
=CREATEOBJECT("form1")

DEFINE CLASS form1 AS form

	ADD OBJECT label1 AS label
	
	PROCEDURE init
		thisform.Height = 0
		this.Label1.Anchor = 16	&& this save thisform.Height into RelativeAxisSize
		thisform.Height = 1     && this do a /RelativeAxisSize
	ENDPROC

ENDDEFINE
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform