diff win/dw.c @ 429:f977c80a1dfa

Check for inconsistent parameters in dw_box_pack_start() and dw_box_pack_end(). Throw up messagebox if an error.
author mhessling@81767d24-ef19-dc11-ae90-00e081727c95
date Tue, 27 May 2003 03:41:57 +0000
parents 4fe2df53ec9f
children 98d6c00fe11e
line wrap: on
line diff
--- a/win/dw.c	Tue May 27 03:40:42 2003 +0000
+++ b/win/dw.c	Tue May 27 03:41:57 2003 +0000
@@ -4720,6 +4720,11 @@
 {
 	Box *thisbox;
 
+if ( width == 0 && hsize == FALSE )
+		dw_messagebox("dw_box_pack_start()", DW_MB_OK|DW_MB_ERROR, "Width and expand Horizonal both unset for box: %x item: %x",box,item);
+if ( height == 0 && vsize == FALSE )
+		dw_messagebox("dw_box_pack_start()", DW_MB_OK|DW_MB_ERROR, "Height and expand Vertical both unset for box: %x item: %x",box,item);
+
 	thisbox = (Box *)GetWindowLong(box, GWL_USERDATA);
 	if(thisbox)
 	{
@@ -7511,6 +7516,11 @@
 {
 	Box *thisbox;
 
+if ( width == 0 && hsize == FALSE )
+		dw_messagebox("dw_box_pack_end()", DW_MB_OK|DW_MB_ERROR, "Width and expand Horizonal both unset for box: %x item: %x",box,item);
+if ( height == 0 && vsize == FALSE )
+		dw_messagebox("dw_box_pack_end()", DW_MB_OK|DW_MB_ERROR, "Height and expand Vertical both unset for box: %x item: %x",box,item);
+
 	thisbox = (Box *)GetWindowLong(box, GWL_USERDATA);
 	if(thisbox)
 	{