Paul,
>In my previous question, I forgot to ask about using the "Find" form functionality in my containers. I already created a container that has a "Find" button. In it's Click method, I do a:
>
>THISFORM.cFindForm = 'CustomerFindForm'
>THISFORM.FindFormActivate()
>
> This works OK, but I get an error when I select a one of the returned records in the find form. (NGOTOPAGEONCANCEL is not found). Before I spend a lot of time trying to find out where I did something wrong, I'm wondering if this will even work (ie. Find in a container instead of directly on the main form).
When you say you are placing your OK button in a container, are you placing user interface controls within the business object container? If you are, I recommend that you do not. Check out the Developer's Guide section "Separating Interface from Implementation" for details.
That said, you can call the form method from within any container you wish.
Secondly, you have stumbled onto an error in the CBizObjForm.FindProcess() method. We have made the following fix to the framework (which will be available in the next version) that you can make to your version right now:
In CBizObjForm.FindProcess()
1. Change...
lnGoToPageOnCancel = ThisForm.nGoToPageOnCancel
ThisForm.nGoToPageOnCancel = 0
To...
lnGoToPageOnCancel = 0
IF PEMSTATUS(This, 'nGoToPageOnCancel', 5)
lnGoToPageOnCancel = ThisForm.nGoToPageOnCancel
ThisForm.nGoToPageOnCancel = 0
ENDIF
2. Change...
ThisForm.nGoToPageOnCancel = lnGoToPageOnCancel
To...
IF lnGoToPageOnCancel != 0
ThisForm.nGoToPageOnCancel = lnGoToPageOnCancel
ENDIF
Sorry for any inconvenience this may have caused!
Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com