This project is read-only.

Bug in New Method Editor Dialog

Dec 4, 2007 at 4:24 PM


I was pretty excited to hear that you had posted this build with Marcia's new Method Editor replacement. When I installed it however, I saw some strange behavior. When I opened a class, I had both the native VFP dialog and Marcia's replacement appear. After digging in my foxcode table for something that shouldn't have been there, I started looking in the code to find out what was going on. In the foxcode record, the _oNewEditProperty.SHOW() was throwing an error causing the code to return .F. and the old dialog to be shown. So I tried to figure out what was going on in the class to cause the show to fail. The error was coming from the edtDefault Refresh method on the line:

This.Value = TRANSFORM( EVALUATE( Thisform.oObject. + ALLTRIM( csrMembers.cName ) ) )

On the current csrMembers record, the cName field was blank causing the eval to fail. So I went looking into where the csrMembers cursor was created. What I found was that the code on line 547 ( EDITSOURCE("MEMBERDATAENGINE.PRG",547) ) was replacing the cName field with lcDisplay and that lcDisplay was empty.

locate for upper(trim(cName)) == upper(lcPEM)
replace cName with lcDisplay, ;
lFavorites with loPEMMemberData.Favorites

I've fixed my code to wrap this code in a IF NOT EMPTY(lcDisplay) and now it seems to work. I didn't dig into why this happens for me in the first place, I'm guessing there is something whacked in my global intellisense values for something but I didn't go looking too far since this could have been something I did years ago when I may have known less than I know now. <g>

Anyways, thought I'd report this in case anyone else was in the same boat as me and so that the next build might fix the situation. Thanks.

Walt Krzystek
Dec 4, 2007 at 11:49 PM
Hi Walt.

Thanks -- I'll look into this and pass it along to Marcia as well.