Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Deleting a column in a grid Crash VFP7
Message
From
17/04/2002 11:32:22
 
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00616778
Message ID:
00645913
Views:
12
This message has been marked as a message which has helped to the initial question of the thread.
>Hi Jim
>
>I have reinstall the sp1 and test it again..
>It's worst I dont get any error message VFP shut down without warning.
>
>This is what i do.
>
>1) Open VFP
>2)Click on file,select New
>3) Select Form
>4) Add a grid in the form
>5) in the property window on the columcount propertie type 10
>6) Right click on the grid select Edit
>7) Click on the Header of any column
>8) In the properties window select the name of the column you have click the header
>9) click on the titel bar of the form designer
>10) Presse the D button
>
>11) Voila ... Fox Shut down
>
>It' weird because I can do this many time and for a reason it stop.
>I have done it 3 time before I write this, and now it works ????
>
>
>This is what I see in my about box
>Microsoft Visual Foxpro 7.0 SP1
>Version 07.00.0000.9465
>
>This is my systeme Config
>Microsoft Windows 2000 French
>5.00.2195
>Service Pack 2
>
>It's install on a Dell Computer at the Factory
>CPU 1500 Mhz
>261 136 Ko Ram
>
>Any idea.... :)
>
>Ben..

I can reproduce this now. Thanks for bringing it to our attention!

Here is some repro code that may make VFP crash or disappear when run:
CLEAR
DELETE FILE testxx.sc?
CREATE FORM testxx nowa
ASELOBJ(aObj,1)
xx = aobj[1]
xx.addobject('grid1','grid')
xx.grid1.columncount = 20
xx.grid1.height = xx.grid1.height + 10
xx.height = xx.height + 10 
WDOCKABLE('properties',0)
* RETURN 
ON ERROR ?MESSAGE()  && you may see 'not enough memory to complete this operation' error
FOR lni =  1 TO 17
	KEYBOARD '{ctrl+m}'
	SUSPEND 
	* select the form itself
	MOUSE CLICK AT 250,10 WINDOW 'form designer - testxx.scx' PIXELS
	DOEVENTS 
	* select the grid
	MOUSE CLICK AT 33,150 WINDOW 'form designer - testxx.scx' PIXELS 
	DOEVENTS 
	* bring up grid context menu, Edit
	KEYBOARD '{shift+f10}e'
	DOEVENTS
	* Click on grid header
	MOUSE CLICK AT 33,75 WINDOW 'form designer - testxx.scx' PIXELS 
	DOEVENTS 
	* select column which contains header in properties window object dropdown
	KEYBOARD '{ctrl+pgup}'
	DOEVENTS 
	* select Form designer, press delete, then Yes to confirm
	KEYBOARD '{ctrl+m}'
	SUSPEND 
	ACTIVATE WINDOW 'form designer - testxx.scx'
	KEYBOARD '{del}y'
	DOEVENTS 
ENDFOR 
ON ERROR 
RETURN 
You may have to run the code several times to make it crash. Also, if you can't make it crash with the automated code above, do this:

1. Uncomment out the RETURN.
2. Run the code.
3. Rightclick on the grid and select Edit.
4. Click on the header for the 2nd column from the left.
5. Press ctrl+pageup to select the column in the properties window
6. Click the form designer titlebar
7. Press the delete key, then Yes to confirm
8. Click outside the grid to deselect it.
9. Repeat steps 3 thru 8 a few times.

The code above will not work correctly in VFP6, but by following the steps manually I was able to cause a crash to occur in VFP6 as well.

Thanks again!
Jim Saunders
Microsoft
This posting is provided “AS IS”, with no warranties, and confers no rights.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform