Beruflich Dokumente
Kultur Dokumente
This document contains information that is essential to your success in upgrading an existing Visual MaxFrame Professional application running under VMP v3.01 to the current v4.0. Read it carefully, paying particular attention to the indicated Retrofitting Instructions. The following is a list of features, enhancements, and modifications to the Visual MaxFrame Professional framework that constitute the difference between v3.01 and v4.0. This document is provided in Word97.DOC format so that you can do text search on specific files/classes/PEMs/etc., and so that you can cut-and-paste example code when necessary. At times this document refers to "Visual MaxFrame Professional only" features because some new features, enhancements, and modifications required modifications to class libraries or other files that are in both the public domain Visual MaxFrame superset, and the Visual MaxFrame Professional comprehensive product.
If you have VMP 3.0/3.01 but are not migrating existing apps to VMP 4.0
If you have an existing set of "intermediate" classes based on the VMP 3.01 framework from which you have created application-specific subclasses for existing VMP 3.01 apps
You should review the contents of this document and make any necessary retrofits. Your VMP 3.01 classes are not compatible with your VMP 4.0 classes, so you should install VMP 4.0 in a new directory/folder structure and keep your existing VMP 3.01 code base separate. Copy your existing "intermediate" classes to your new VMP 4.0 directory/folder structure, and follow the retrofitting instructions in this document as they apply to your "intermediate" classes. See the If you are upgrading an existing app from VMP 3.01 to VMP 4.0 section below.
If you have no existing VMP 3.0 code/classes you will be using for VMP 4.0 projects
You should review the contents of this document to familiarize yourself with the enhancements, modifications, and new features of VMP 4.0.
If you are upgrading an existing app from VMP 3.01 to VMP 4.0
You must follow the retrofitting instructions listed in this document. Each modification, enhancement, and new feature is listed in this document, along with the retrofitting implications to existing VMP 3.01 apps, if any.
Prepare
Read the entire contents of this document to familiarize yourself with the new features and enhancements, paying attention to the retrofitting instructions and the implications for your existing applications.
Please note that although we have made every effort to determine any retrofitting modifications youre likely to have to make, you should review each item carefully because you may have implemented subclasses in such a way that you will have to modify/maintain code/PEMs in a manner we cannot anticipate. We have made every effort to ensure that new features, enhancements, and modifications require a minimum retrofit effort (we have to perform such retrofits on our existing applications, too!). Make a backup of your entire existing application(s) before retrofitting. The backup should be available, running in v3.01 during the retrofit process.
Install
Install Visual MaxFrame Professional 4.0 files into a new directory/folder structure separate from your existing VMP 3.0 installation. Installation instructions are listed in the VMP 4.0 Reference Guide. Be sure to keep your current v3.01 VMP files intact, along with the backup copy of your existing application. During the entire migration process, you should keep the VMP 3.01 version of your app in working order as a reference point. Once you are completely satisfied that your app(s) have been successfully migrated to VMP 4.0, you may delete your VMP 3.01 framework files and your VMP 3.01 application if you wish.
Retrofit
Perform any needed retrofitting activities on your existing applications as described in the remainder of this document.
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 2
Page 3
XXWBFNSH.BMP XXWBMFSM.BMP XXWBMP.BMP XXWBSHCT.BMP XXERROR.FRX * XXFWUSR.FRX * * indicates those files that are likely to be referenced in app-specific code
Retrofitting Instructions
Retrofitting requires that any/all references to the X3 version of the above files be removed from your existing VMP 3.01 application(s). The required retrofitting is included in the Retrofitting Instructions in the next MODIFICATION: Major PEM reorganization section, items 3 and 5.
Page 4
cmdData Init() modified to set a default ToolTipText based on the new icType property, default ilCallSecurityFromRefresh Refresh() added default code icType new public property, default to SPACE(0) ilCallSecurityFromRefresh new public property, default to .NULL. SetUserSecurity() added default code zReadMe() updated cmdDataMovePointer Refresh() modified to conditionally call THISFORM.ActionButtonRefreshLogic() icType reset to default SetUserSecurity() overridden AfterClick() removed Click() modified to defer the actual form.Refresh() to the Form.MovePointer() method cmdDataCallMemoEditForm icType set to "M" in the Properties Sheet cmdDataAction NEW CLASS Click() call the THISFORM.Action() method corresponding to THIS.icType cmdDataAdd -- REMOVED cmdDataCancel -- REMOVED cmdDataDelete -- REMOVED cmdDataFind -- REMOVED cmdDataPrint -- REMOVED cmdDataOK -- REMOVED cmdDataSave -- REMOVED XXFWFRM.VCX frmDataEntrySCADO -- REMOVED frmDEOne2Many -- REMOVED frmDataEntry Activate() modified logic to go into "AddOnTheFly" mode even if there's no <Add> button ActionButtonRefreshLogic() new public method with code migrated from the individual cmdData.. buttons AddAction() new public method corresponding to the old cmdDataAdd.Click() AddBeforeAppendBlank() new public method corresponding to the old cmdDataAdd.ShellBeforeAppendBlank(), can RETURN a logical .F. to bring the <Add> to a halt AddAfterAppendBlank() new public method corresponding to the old cmdDataAdd.ShellAfterAppendBlank() BoundControlsInteractiveChange() renamed to EditAction() DeleteAction() modified to incorporate the code from the old cmdDataDelete.Click(), eliminates the old cmdDataDelete.TakeActionOnFailure user-messaging by calling the new THISFORM.SaveMessageOnFailure(), which also required updating the wording of several MSGSVC.DBF records for "Save, unable" DeleteConfirmation() new public method corresponding to the old cmdDataDelete.UserConfirmation() and the old cmdDataDelete.MessageText() DeleteAdditionalAction() new public method corresponding to the old frmDataEntry.ShellAdditionalDeleteAction() DeleteBeforeAnything() new public empty/shell method DeleteAfterSuccess() new public empty/shell method DeleteAfterFailure() new public empty/shell method EditAction() the old BoundControlsInteractiveChange() method, simply renamed FindAction() new public method corresponding to the old cmdDataFind.Click() FindUI() new public method corresponding to the old cmdDataFind.DoTheFind() icFindActionTag new public property, default to SPACE(0), corresponds to the old cmdDataFind.icFreeTableTag SaveAction() new public method corresponding to the old cmdDataSave.Click() SaveBeforeAnything() new public method corresponding to the old cmdDataSave.ShellBeforePreSave() SaveGenAndPopPK() new public method corresponding to the old cmdDataSave.PreSave() SaveBeforeUpdateBuffers() new public method corresponding to the old cmdDataSave.ShellAfterPreSave() SaveAfterSuccess() new public method corresponding to the old cmdDataSave.AfterUltimateSuccess() SaveAfterFailure() new public method corresponding to the old cmdDataSave.AfterUltimateFailure() SaveUpdateAddOnTheFlyRecord() new public method corresponding to the old cmdDataSave.UpdateAddOnTheFlyRecord() SaveCheckRequiredFields() new public method corresponding to the old cmdDataSave.CheckRequiredFields() SaveMessageOnFailure() new public method corresponding to the old cmdDataSave.SaveMessageOnFailure() SaveODBCMessageOnFailure() new public method corresponding to the old cmdDataSave.ODBCErrorMessage() PushMainAliasRecno() the old SaveMainAliasRecno() method renamed, also modified PopMainAliasRecno() the old RestoreMainAliasRecno() method renamed
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions VM4UPGRD.DOC
Page 5
inSaveMainAliasRecno removed, as per the warning in the VMP 3.0 property description. The equivalent value can be queried via THISFORM.ioSaveMainAliasRecno.GetPProp("inSaveRecno") iaSaveFailureInfo actually added to frmData but used throughout frmDataEntry, to hold information regarding a failed SaveAction() and give the user a default or explicit message in SaveMessageOnFailure(). frmDEGridNav Redefined to inherit from frmDataEntry, now that frmDataEntrySCADO has been eliminated. Manual scope resolution operator callbacks updated accordingly. Added six instances of XXFWCTRL.VCX/cmdDataAction, now that this form class inherits the action buttons from frmDataEntrySCADO: Add, Delete, Save, Cancel, Print, OK (no Find). Each button has its icType, Caption, and Name properties set accordingly, yielding the same effect as frmDEGridNav when it inherited from frmDataEntrySCADO. frmEventLog Hack the record for the cmdDeleteAll member to redefine it to inherit from cmdDataAction (replace the Class field with "cmdDataAction". Also set the icType property to "D". cmdDelete.Click() -- modified frmDEGridNav2Pages DeleteAction() modified to incorporate the logic formerly in the old cmdDelete.Click() UpdateFormOnAdd() modified to incorporate the logic formerly in the old cmdAdd.Click() tbrGen BeforeFormControlMethod() removed AfterFormControlMethod() removed ControlSelection() modified tbrSCADONav Click() modified to add/insert the new 1 st parameter passed to THISFORM.ControlSelection() OnTimer() modified to call _Screen.ActiveForm.ActionButtonRefreshLogic() when indicated cmdFind.Click() modified LinkedMenu() modified to update the SKIP FOR logic, also required updating the STRINGS.DBF records for \<Print and Pre\<vious to P\<rint and \<Previous, to match the icType property settings
Retrofitting Instructions
Throughout this listing, the "ZZ" designation indicates your app-specific (and/or intermediate) subclasses of the VMP framework. Once you have completed these items, you will also have retrofit the file name changes in the previous MODIFICATION: X3 prefix replaced with XX section. If you only have Visual MaxFrame (not Visual MaxFrame Professional), only items 1 thru 5 apply. 1. Copy your existing VMP 3.x application to a new directory/folder structure. Not only should you have a backup of your application, but you'll perform all migration tasks on the copy. Once the migration/retrofitting tasks are complete, the copy will be the VMP 4.0 version of your application. If you haven't done so already, install VMP 4.0. Be sure to not overwrite your existing VMP 3.0/3.01 installation, but rather install VMP 4.0 to a new directory structure. At least until you finish the migration of your app to VMP 4.0, you'll need to be able to run your existing VMP 3.x application in its entirety. Modify your CONFIG.xxD configuration file as necessary to reflect the new development setup, including: If you have a line to set your _BUILDER to X3BUILDR.PRG, be sure to update that to XXBUILDR.PRG. Be sure to update your PATH line to point to your new VMP4\XLIB files. Do not include your old VMP3\XLIB directory in the PATH. For best results, rename the folder where your VMP 3.0 framework files are located, so that VFP won't be able to find those files at all (rename the folder back to its original name any time you are working with your working backup copy of your existing VMP 3.x application). In order for the new CONFIG.xxD settings to take effect, quit VFP and start a new session. In VFP 6.0, you can just issue the new SYS(3056) function at the Command Window, rather than quitting and starting a new session.
2.
3.
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 6
4.
Update your existing VMP-required main database and ZZCONFIG.DBF free table. If you have Stored Procedures of your own (not the VMP-created ones), save them to a file because this step will delete the existing stored procedures. DO XXFWDATA WITH "ZZ","MIN",.T. to replace the APPCONFIG (ZZCONFIG.DBF) and APPINFO tables, replace the USERS table, and replace the V_USERS view with the V_USERSLIST view. For those APPINFO/APPCONFIG records where your application uses non-default values, update those tables in the new ZZ.DBC database. If your existing application adds records to the APPCONFIG/APPINFO tables, add those to the new ZZ.DBC database. Update the USERS table in the new ZZ.DBC database with the equivalent records in the existing application. DO XXFWDATA WITH "ZZ","USERPREFS",.T. to replace the USERPREFS table. All existing user preferences will be lost, which is generally no big deal, but if you want you can append the records from the existing USERPREFS table the only changes in VMP 4.0 is larger field sizes. DO XXFWDATA WITH "ZZ","SECURITY",.T. if you want to implement the optional VMP user security system in the application (and you have Visual MaxFrame Professional ) DO XXFWDATA WITH "ZZ","RI",.T. to add necessary VMP-specific Referential Integrity meta data, whether you intend to use the VMP RI engine or not we use it to enforce RI on the VMP tables in the .DBC database. Copy any Stored Procedures you saved above into the Stored Procedures of the updated .DBC database.
5.
All your existing classes point to/inherit from classes that no are no longer valid they have either been renamed (X3*.VCX to XX*.VCX) and/or have been copied to a new folder. For each class you've subclassed directly from the VMP framework (typically the ZZFW*.VCX class libraries at the app-specific level), the ClassLibrary property (indicates where the ParentClass is located) has to be updated. You can accomplish this in the Class Browser or by attempting to open the class in the Class Designer, and locating the parent class library in the Locate dialog; or you can hack each appspecific .VCX and update the ClassLoc field, which displays in the Class Designer as the ClassLibrary property:
use <??FW*.VCX> brow for "X3" $ upper(ClassLoc) ** change all X3FW*.VCX references in the ClassLoc field to XXFW*.VCX ** also change the relative pathing to reflect the location of the VMP 4.0 version use
If you have created intermediate subclasses, they will need to be copied to a new folder location and thus redefined to "point" to the new XXFW.VCX class libraries. Your app-specific classes will then have to be thus redefined to "point" to the new ??FW.VCX class libraries. 6. IMPORTANT! Until further notice (further down this retrofitting instruction list), do not open any of your app-specific forms or form classes in the Form/Class Designers! By not using the designers (no need to anyway), you will preserve method code and property settings for native VFP PEMs (like Click and Refresh) and will have less work to do later on. You should not have a frmZZDEOne2Many subclass of X3FWFRM.VCX/frmDEOne2Many (see the warnings in the zReadMe), but if you do, use the Class Browser to remove it since XXFWFRM.VCX no longer contains a frmDEOne2Many. If you not only have a frmZZDEOne2Many, but have created forms based on it, you'll need to keep frmDEOne2Many, but you will have some work on your hands to keep things intact. You'll have to create a separate .VCX just for the old frmDataEntrySCADO and frmDEOne2Many form classes (both now removed from the VMP framework) and redefine any existing forms to inherit from there. If you have a frmZZDataEntrySCADO form class, use the Class Browser (or hack ZZFWFRM.VCX) to redefine it to inherit from XXFWFRM.VCX/frmDataEntry. Create a cmdZZDataAction subclass of XXFWCTRL.VCX/cmdDataAction.
7.
8. 9.
10. If you have any cmdZZDataAdd, cmdZZDataCancel, cmdZZDataDelete, etc. commandbuttons in your ZZFWCTRL.VCX, use the Class Browser (or hack ZZFWCTRL.VCX) to redefine them all to inherit from your new cmdZZDataAction class. Set the icType property, Caption in each button as shown below in step #10.
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 7
11. If you have a frmZZDataEntrySCADO form class but do not have one or more of the following button classes in your ZZFWCTRL.VCX, create them now, with the following property settings: ClassName cmdZZDataFind cmdZZDataSave cmdZZDataCancel cmdZZDataPrint cmdZZDataDelete cmdZZDataAdd cmdZZDataOK Caption \<Find \<Save Cancel P\<rint \<Delete \<Add \<OK icType F S C R D A O Cancel .T.
.T.
12. Remove any existing cmdZZData class unless you've used it to provide inheritance to buttons other than your nowredefined cmdZZDataAdd/Cancel/Delete/etc. buttons. 13. If you have a frmZZDataEntrySCADO form class, open it in the Class Designer and add an instance of the new cmdZZDataAdd/Cancel/Delete/Find/Print/OK/Save buttons to your frmZZDataEntrySCADO class to replace the ones that used to be inherited from frmDataEntrySCADO. Add them in the order shown in the listing in step #10. Set the Name property for each button to cmdAdd, cmdCancel, cmdDelete, etc., to match what they were before. Modify any explicit :: scope-resolution operator callbacks in your frmZZDataEntrySCADO to callback to frmDataEntry, not the nowremoved-frmDataEntrySCADO. 14. It is now safe to use the Form/Class Designers (see step #5), now that your frmZZDataEntrySCADO form class has its buttons back. 15. DO XXDTSRCH on ".SaveMainAliasRecno(" and replace any such calls with .PushMainAliasRecno(. DO XXDTSRCH on ".RestoreMainAliasRecno(" and replace any such calls with .PopMainAliasRecno(. DO XXDTSRCH with ".inSaveMainAliasRecno" and replace any such calls with .ioSaveMainAliasRecno.GetPProp("inSaveRecno") . 16. DO XXDTSRCH with ".PrintReport(" and replace any such calls with .PrintAction(. 17. DO XXDTEPEM with "BeforeFormControlMethod" and "AfterFormControlMethod". If you find any such method code, you'll have to find a way to do without them they have been removed from XXFWFRM.VCX/tbrGen. 18. Update your app-specific STRINGS.DBF and MSGSVC.DBF with the changes made in this modification. The records that have been changed are marked with "***" in their cWhere field, just SET FILTER TO cWhere = "***" to look at them and compare them to your existing app-specific versions. Note that if you haven't added any new records to your app-specific STRINGS/MSGSVC tables, all you have to do is copy the new framework versions over your existing app-specific tables. DO XXDTMEST to update your app-specific MSGSVC.DBF and STRINGS.DBF tables with the records that are new to VMP 4.0. 19. DO XXDTEPEM with "AfterClick" to find any instances of cmdDataMovePointer buttons in which you've got some explicit code in the AfterClick method. If so, you'll have to move that code to the Click, after a manual callback, since the AfterClick() method has been removed. 20. In your backup/v3.01 copy of your app, DO X3DTEPEM with "BoundControlsInteractiveChange" to find any instances of frmDataEntry, ctrMover, frmMover that have specific BoundControlsInteractiveChange code. Transfer that code to the corresponding EditAction method of your VMP 4.0 app. Be sure to rename any manual "::BoundControlsInsteractiveChange()" callbacks to "::EditAction()". In the new VMP 4.0 version of you app, DO XXDTSRCH WITH ".BoundControlsInteractiveChange" and replace all explict calls to this renamed method to ".EditAction". 21. Modify your ZZMAIN.PRG main calling program to call XXFWMAIN.VCX instead of X3FWMAIN.VCX. Also make sure the call to XXFWMAIN.PRG sends only one parameter a string specifying the name of your ZZCONFIG.DBF file.
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 8
22. Delete your ZZ.PJX project file. Create a new one and add ZZMAIN.PRG as the main calling program. Rebuild the project, and ignore all the complaints about not being able to find files (you can just select <Ignore All> the first time you get the dialog). Review the log of errors the Project Manager creates, and modify the problem code, which should mainly consist of X3*.*calls that need to be changed to XX*.* references, usually those files that are marked with an asterisk in the listings in the previous MODIFICATION: X3 prefix changed to XX section. You may have to Rebuild the ZZ.PJX project several times to find all the now-invalid references. 23. Review the project and add any other files that were not pulled in automatically, including the .DBC, free tables, MSGSVC.DBF (and STRINGS.DBF if it's an INTL-Toolkit app), FLLs, etc. It's particularly important to make sure your .DBC(s) are added to the project, because they can contain Stored Procedure code that needs to be checked for references to X3*.* files that have been renamed to XX*.* counterparts. 24. Find any remaining references to the renamed VMP framework files by DOing XXDTSRCH WITH <FileName> for each of the files marked with an asterisk in the listings in the previous MODIFICATION: X3 prefix changed to XX section. For class libraries, note that you should DO XXDTSRCH WITH the filename minus the ".VCX" extension because some class library references don't include the extension (for example, when calling X3SETCLS(), the extension for the .VCX file name is optional). Once you find each X3 version of these files, change the "X3" to "XX". You can modify each occurrence right in the XXDTSRCH dialog by selecting each item in the Search Results form of XXDTSRCH and selecting the <Modify> button/Modify from the shortcut menu/double-clicking on the listbox row. 25. Several records in ZZCONFIG/APPINFO likely contain references to X3FW*.VCX in the Ap_ItemValue/App_ItemValue field. Update them to specify the new XX files. 26. DO VM34UTL1.PRG (the resulting output is named < ProjectName.VM4>) on your existing application in VMP 3.0/3.01. DO VM34UTL1.PRG from the Command Window, in the normal development environment for the app (as if you were going to develop the application pathing set correctly, etc.). 27. Relocate/update PEMs from instances of old cmdZZDataAdd/Cancel/Delete/Find/OK/Print/Save buttons to their new location on the containing form. The output from VM34UTL1.PRG likely contains just about everything (and more) that's needed here; print out the ZZ.VM4 file, copy it to a document, etc., use it to copy/paste existing code. An alternative to the ZZ.VM4 output is to DO X3DTEPEM (on your backup application) for each PEM listed here to track down places in your existing application where each PEM is explicitly set/coded. Note that if you have any buttons of this type that you have been rendering permanently invisible by setting Visible=.F. and Enabled=.F. in the Properties Sheet, you are likely to have to accomplish the same thing henceforth by setting those two properties in the Refresh() method instead. Be sure to review all the code for accuracy before pasting to its new location (THIS has a different meaning when the code is transferred to the form level, DODEFAULT() and manual callbacks refer to a different class inheritance hierarchy, etc.). Please don't be intimidated by the length of this comprehensive list; you are not likely to have much actual work here. If you have explicit code/settings for this VMP 3.01 Method/Property (DO X3DTEPEM on this item or refer to ZZ.VM4 output) ShellBeforeAppendBlank ShellAfterAppendBlank Click (don't bother DOing X3DTEPEM on this one) Refresh (don't bother DOing X3DTEPEM on this one) in an instance inheriting from this VMP 3.01 Class X3FWCTRL.VCX cmdDataAdd X3FWCTRL.VCX cmdDataAdd X3FWCTRL.VCX cmdDataAdd X3FWCTRL.VCX cmdDataAdd then transfer/migrate that PEM code/setting to this VMP 4.0 location
The containing form AddBeforeAppendBlank() note that it can now RETURN .F. to bring the <Add> to a halt The containing form AddAfterAppendBlank() Augment the containing form AddAction or maybe put some/all the code in the containing form AddBeforeAppendBlank/AddAfterAppendBlank Likely goes in the Refresh() of the instance, overriding the framework abstracted behavior. Note that if you've followed the retrofitting instructions above carefully, this code should be preserved on MODIFYing the containing FORM/CLASS at this point
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 9
Click (don't bother DOing X3DTEPEM on this one) Click (don't bother DOing X3DTEPEM on this one) Click (don't bother DOing X3DTEPEM on this one) Refresh (don't bother DOing X3DTEPEM on this one)
Augment the containing form FindAction() Likely goes in the Refresh() of the instance, overriding the framework abstracted behavior. Note that if you've followed the retrofitting instructions above carefully, this code should be preserved on MODIFYing the containing FORM/CLASS at this point Containing form.FindUI(), existing code most likely transfers here unchanged Containing form icFindActionTag
DoTheFind icFreeTableTag
Click (don't bother DOing X3DTEPEM on this one) Refresh (don't bother DOing X3DTEPEM on this one)
Augment the containing form SaveAction() Likely goes in the Refresh() of the instance, overriding the framework abstracted behavior. Note that if you've followed the retrofitting instructions above carefully, this code should be preserved on MODIFYing the containing FORM/CLASS at this point Containing form SaveBeforeAnything() Also, if you did any explicit messaging to the user, that should be replaced by populating THISFORM.iaSaveFailureInfo[] see XXFWFRM.VCX/frmDataEntry.SaveAction() header comments. Containing form SaveGenAndPopPK() Also, if you did any explicit messaging to the user, that should be replaced by populating THISFORM.iaSaveFailureInfo[] see XXFWFRM.VCX/frmDataEntry.SaveAction() header comments. SaveBeforeUpdateBuffers() Also, if you did any explicit messaging to the user, that should be replaced by populating THISFORM.iaSaveFailureInfo[] see XXFWFRM.VCX/frmDataEntry.SaveAction() header comments. frmDataEntry does not have a corresponding method the logic is replaced by calls in SaveAction to each data-entry grid's OnFormSaveAction() method. Also, if you did any explicit messaging to the user, that should be replaced by populating THISFORM.iaSaveFailureInfo[] see XXFWFRM.VCX/frmDataEntry.SaveAction() header comments. SaveCheckRequiredFields() SaveAfterSuccess() SaveAfterFailure()
VM4UPGRD.DOC
ShellBeforePreSave
X3FWCTRL.VCX cmdDataSave
PreSave
X3FWCTRL.VCX cmdDataSave
ShellAfterPreSave
X3FWCTRL.VCX cmdDataSave
ProcessDataEntryGrids
X3FWCTRL.VCX cmdDataSave
Page 10
cmdDataSave X3FWCTRL.VCX cmdDataSave X3FWCTRL.VCX cmdDataSave X3FWCTRL.VCX cmdDataSave X3FWCTRL.VCX cmdDataSave X3FWCTRL.VCX cmdDataDelete X3FWCTRL.VCX cmdDataDelete
Click (don't bother DOing X3DTEPEM on this one) Refresh (don't bother DOing X3DTEPEM on this one)
X3FWCTRL.VCX cmdDataDelete X3FWCTRL.VCX cmdDataDelete X3FWCTRL.VCX cmdDataDelete X3FWFRM.VCX frmDataEntry X3FWCTRL.VCX cmdDataPrint X3FWCTRL.VCX cmdDataPrint
Augment the containing form DeleteAction(), or possibly locate in one of the new methods: DeleteBeforeAnything(), DeleteAfterFailure(), DeleteAfterSuccess() Likely goes in the Refresh() of the instance, overriding the framework abstracted behavior. Note that if you've followed the retrofitting instructions above carefully, this code should be preserved on MODIFYing the containing FORM/CLASS at this point Containing form DeleteConfirmation() combines both the old UserConfirmation() and MessageText() Containing form DeleteConfirmation() combines both the old UserConfirmation() and MessageText() no longer applicable instead, the SaveMessageOnFailure() is called from DeleteAction() Form.DeleteAdditionalAction()
Click (don't bother DOing X3DTEPEM on this one) Refresh (don't bother DOing X3DTEPEM on this one)
Augment the containing form PrintAction() Likely goes in the Refresh() of the instance, overriding the framework abstracted behavior. Note that if you've followed the retrofitting instructions above carefully, this code should be preserved on MODIFYing the containing FORM/CLASS at this point
To verify that your class libraries have been successfully upgraded to VMP 4.0, load your ZZ.PJX project up in the Class Browser in the Open Dialog, change the "Files of type" dropdown to "Project", and select your ZZ.PJX project file. If the migration has been completed successfully: 1. No classes should have a << double-chevron at the left, which indicates that they inherit from a class library not included in the project. 2. There should only be one class at the outermost indent for each VFP base class a "xxxBase" VMP "base" class.
Page 11
The OnUpdateFormOnNew method has been renamed to OnUpdateFormOnNav XXFWCTRL.VCX cmdDataMovePointer The ilUpdateFormOnNew property has been renamed to ilUpdateFormOnNav
Retrofitting Instructions
1. 2. 3. 4. In the VMP 3.01 version of your app, DO X3DTEPEM WITH "OnSave" and copy any such explicit method code to the OnFormSaveAction method of the same grid class/instance in the VMP 4.0 version of your app. In the VMP 3.01 version of your app, DO X3DTEPEM WITH "UpdateFormOnNew" and copy any such explicit method code to the UpdateFormOnNav method of the same grid class/instance in the VMP 4.0 version of your app. In the VMP 3.01 version of your app, DO X3DTEPEM WITH "OnUpdateFormOnNew" and copy any such explicit method code to the OnUpdateFormOnNav method of the same grid class/instance in the VMP 4.0 version of your app. In the VMP 3.01 version of your app, DO X3DTEPEM WITH "ilUpdateFormOnNew" and copy the value of this property to the ilUpdateFormOnNav property of the same button class/instance in the VMP 4.0 version of your app.
Retrofitting Instructions
1. 2. If you have any code in the PrintReport() method of any existing forms, copy this code to the new PrintAction() method. Replace any calls in your application specific code to THISFORM.PrintReport() or THIS.PrintReport() to call the PrintAction() method instead.
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 12
XXFW.VCX cmdBase KeyPress() modified to remove the code to set Grid.inLastnKeyCode chkBase KeyPress() modified to remove the code to set Grid.inLastnKeyCode spnBase KeyPress() modified to remove the code to set Grid.inLastnKeyCode txtBase KeyPress() modified to remove the code to set Grid.inLastnKeyCode pgfPageRefresh SeeIfPageNeedsRefreshing() modified frmData iaSaveFailureInfo new icFailedUpdateTableAlias removed, replaced by THIS.iaSaveFailureInfo[4] grdBase Init() modified When() modified Refresh() modified iaRelationInfo new StoreRelationInfo() new IsCurrentRowBlank() -- new XXFWMISC.VCX cusChildCursorSvc new class XXFWGRD.VCX grdDataEntry Many PEMs in this class have been removed, several new ones have been added, and EVERY remaining method in this class has been modified. The net effect of these modifications should mean little or no retrofitting chores, but you should review the list of notable items just in case. Methods that have been Reset To Default: Refresh() PEMs that have been modified: icPKFieldName now REQUIRED, not optional (but can be set to .NULL. to indicate that PK generation should be ignored), check all your data-entry grids to make sure this property is set explicitly, either in the Properties Sheet, or in method code Init() OnFormDestroy() OnFormSaveAction() AddRow() BeforeRowColChange() AfterAppendBlank() CommonColumnControlLostFocus() PEMs that have been removed, you should DO XXDTSRCH to see if you have any explicit references that need updating: GenAndPopKeys() behavior transferred to cusChildCursorSvc (in VMP 3.01, this behavior was abstracted in grdDataEntry.OnSaveAfterDeleteBlankRows) SetLastRecno() behavior eliminated, you will likely have code that needs to simply remove these calls, especially common in the ShellRequery() method of data-entry grids inLastRecno eliminated along with SetLastRecno() BeforeAppendBlank()
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 13
ilAllowAddNew inLastnKeyCode ilRIDelete DeleteAllRows() DeleteCascade() DeleteChildrenInGrids() PrepareForDeleteCascade() inSaveRecno SaveRecno() RestoreRecno() UpdateAddOnTheFlyRecord() ilRegisterWithForm icParentViewAlias -- DO XXDTEPEM with "icParentAlias" and make sure all your grdDataEntry.icParentAlias properties reflect the ALIAS() of the .icParentPKFieldName property PEMs that are new: icChildCursorClass ilAllowAddNewRecord ioChildCursor IsRecnoTheLastRow() OnFormAddAction() OnFormCancelAction() OnFormDeleteAction() OnFormUpdateBuffers() OnUpdateFormOnAdd() OnUpdateFormOnCancel() OnUpdateFormOnDelete() OnUpdateFormOnEdit() OnUpdateFormOnNav() OnUpdateFormOnSave() AfterAppendBlank() -- code migrated here from AddRow() XXFWGRD.VCX cmdDEGridDelete Click() modified to remove the parameters passed to Grid.DeleteCurrentRow() cmdDEGridAdd Refresh() -- modified
Page 14
Retrofitting Instructions
No retrofitting required unless you have calls to the pageframe.FormContainsDataEntryGrids() method, in which can be replaced by a check for TYPE("THISFORM.iaDataEntryGrids[1,1].BaseClass") = "C", as is done in pgfPageRefresh.SeeIfPageNeedsRefreshing(). (In VFP 6.0 apps, you can use the VARTYPE() function instead.) To find any such calls, DO XXDTSRCH WITH ".FormContainsDataEntryGrids(".
Retrofitting Instructions
If you have any explicit Click() code or UserConfirmation() code, that logic may have to be modified/migrated to the associated data-entry grid. You can check for explicit UserConfirmation() code by DOing XXDTEPEM WITH "UserConfirmation".
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 15
Retrofitting Instructions
See Chapter 15: Referential Integrity of the VMP 4.0 Reference Guide.
Retrofitting Instructions
For any existing calls to X3GENPK() for which you've passed the 7 th tlGenericID parameter as .T., you need to make sure the 5th tlNumeric parameter is passed explicitly as .T. in order to maintain the old behavior of generating numeric/integer keys. DO XXDTSRCH WITH "X3GENPK(" to find any such calls to X3GENPK.
No retrofitting required
Existing applications will simply start skipping additional characters from now on.
No retrofitting required
ENHANCEMENT: improved technique for preventing multiple instances of the app at one workstation
We've implemented a variation of George Tasker's article in the November 1998 issue of FoxPro Advisor magazine to prevent multiple instances of the app at one workstation. It is faster (especially when Steven Black's INTL Toolkit is installed) and more reliable than the technique we have been using in previous versions of VMP. XXFW.VCX ctrApp SetupMultipleInstances() modified Destroy() modified Init() -- modified
No retrofitting required
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 16
Retrofitting Instructions
No retrofitting is required unless you want to change the default 5 minute timeout interval.
No retrofitting required
No retrofitting required
No retrofitting required
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 17
No retrofitting required
No retrofitting required
No retrofitting required
Retrofitting Instructions
No retrofitting required unless: 1. You have explicit code the SetupMultipleInstances() of an oApp subclass that conflicts or is rendered unnecessary by this enhancement. DO XXDTEPEM WITH "SetupMultipleInstances" to review any such explicit code. 2. You have (non VMP framework) code that calls X2WEXIST(), which is no longer distributed with Visual MaxFrame Professional. If so, you'll need to copy the X2WEXIST.PRG from VMP 3.01 to your VMP 4.0 \XLIB directory/folder. DO XXDTSRCH WITH "X2WEXIST" to find any such explicit calls.
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 18
XXFWMAIN.PRG Modified to call a new oApp.InitialVisibleActions() method to handle _Screen visibility and release any installed splash screen to make it easier to customize these behaviors. The Visual MaxFrame Professional Application Setup Wizard has been enhanced to allow setting the new oApp.ilSDIApp property. XXFW.VCX ctrApp ilSDIApp_Assign() new method ioSDIForm new property SaveReset() modified InitialVisibleActions() modified SetupScreen() modified InstallWallPaper() modified Destroy() modified SetSDIParentForm() new method cusMenu Init() modified InstallInitialMenu() modified XXWBAPPS.PRG/Application Setup Wizard The Application Setup Wizard has been modified to allow setting oApp.ilSDIApp.
No retrofitting required
ENHANCEMENT: control the ROLLOVER portion of SET CENTURY TO via APPCONFIG record
XXFW.VCX/ctrApp.SetupSets() has been enhanced in VMP 4.0 to ensure that VFP 5.0 apps use the new default behavior of VFP 6.0 for SET CENTURY TO..ROLLOVER (in VFP 5.0, a plain SET CENTURY TO results in the century being set to 19, even in the year 2000). In this further enhancement, you can specify the ROLLOVER year in an APPCONFIG record "SetCenturyToRollover". XXFW.VCX ctrApp Init() modified to call the new SetupSets2() method SetupSets() modified SetupSets2() new method XXFWDATA.PRG modified to add the new "SetCenturyToRollover" default record (defaults to 50)
No retrofitting required
Page 19
XXFWDATA.PRG increases the size of Ap_ItemVal and App_ItemVal from C(100) to C(254). XXFWDATA.PRG
No retrofitting required
No retrofitting required
Retrofitting Instructions
If any of your existing apps have overriding/augmented code in the InstallBitampWallpaper() of oApp subclasses, you'll have to move that code to the new InstallWallpaper() method. DO XXDTEPEM WITH "InstallBitmapWallpaper" to find any such methods. If you have any code that calls oApp.InstallBitmapWallpaper(), it needs to be modified to call oApp.InstallWallpaper() instead. DO XXDTSRCH WITH ".InstallBitmapWallpaper" to find any such references.
No retrofitting required
However, if you've been doing the same type of thing in more complicated code augmenting oApp.Init(), you can likely simplify that code and move it to the new SetupHook1() method.
No retrofitting required
Page 20
No retrofitting required
unless, of course, you prefer the FoxHead icon<g>
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 21
Retrofitting Instructions
If you have any app-specific references to the former ?lcUsr_PK parameter for the V_USERS parameterized view, you'll need to change them to ?luUsr_PK. DO XXDTSRCH WITH "lcUsr_PK" to track them down. If your existing application(s) are INTL-enabled, you'll need to make sure your USERS table adds the new Usr_INTLLanguage C(20) field, populated with "Original" or whatever language is currently set for each user in any existing UserPrefs table. Ditto for the new Usr_EnablePrefs L(1) field, populated with a logical value indicating whether that user wants to run with user preferences enabled/disabled. If you are not running with user preferences, you likely have nothing to do except maybe to make sure your main Visual MaxFrame-required database does not have a USERPREFS table. If you are running with user preferences, read on: You'll have to create the V_USERPREFS view. Depending on your situation, you can use XXFWDATA.PRG to do it: OPEN DATA <YourDBC> DO XXFWDATA with <Your2CharPrefix>,"USERPREFS" If you have explicit references to the USERPREFS table, you'll likely need to change them to the new V_USERPREFS view. DO XXDTSRCH to find such references to USERPREFS. If you have any explicit (non framework) calls to oUser methods listed above that have been migrated to the new XXFW.VCX/cusUserPrefs class definition, you'll have to update them to call oUser.oPrefs instead of oUser, and to use the new method name. DO XXDTSRCH to find such calls.
No retrofitting required
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 22
GotFocus() modified LostFocus() modified Destroy() modified SetupHelp() new method CleanupHelp() new method
Retrofitting Instructions
Add a "SetHelpToFile" record to your APPCONFIG table, and populate the Ap_ItemVal field with the name of your Help file. This retofitting is obviously optional if you have already subclassed oApp or another global Visual MaxFrame object to SET HELP TO in a method. See also the header comments in XXFW.VCX/frmBase.SetupHelp() and XXFW.VCX/frmBaseCleanupHelp().
Retrofitting Instructions
No retrofitting is required, but for apps currently in development, you might want to modify the main calling program to pass a constant or conditional value as the 2nd parameter to XXFWMAIN.
No retrofitting required
No retrofitting required
ENHANCEMENT: Setup Wizard allows you to specify the name/caption of the shortcut
The desktop shortcut page of the Visual MaxFrame Professional Application Setup Wizard allows you to specify the Name/Caption of the shortcut, rather than forcing it to the "2-character app prefix".
No retrofitting required
ENHANCEMENT: App wizard deletes the File/Log out default XXFWMAIN.MNX menu option
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions VM4UPGRD.DOC
Page 23
VMP 4.0 contains the new "user log out" feature, but when the APPCONFIG record for "LoginControl" is set to "None", the Application Setup Wizard deletes the default File/Log out menu option from the app-specific menu (if any) that the wizard creates. XXWB.VCX frmWizAppSetup FinishAction_CreateMenu() -- modified
No retrofitting required
No retrofitting required
No retrofitting required
ENHANCEMENT: Shortcut menu available for CONFIG.FPW editbox on Page4 of Application Setup Wizard
The editbox on Page4 of the Application Setup Wizard allows editing the development CONFIG.FPW, and now has a shortcut menu to allow easier editing of its contents.
No retrofitting required
No retrofitting required
No retrofitting required
The details of this new feature are explained in the Reference Guide chapter User Security and Related Features. Please consult that reference for the new features they are not listed here. What we've included here are those items that possibly require retrofitting of existing VMP 3.01 apps.
Retrofitting Instructions
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 24
The Users.Usr_Rights field has been changed from C(1) to N(1), and the acceptable values have changed accordingly: VMP 3.0/3.01 acceptable values (none) "S"upervisor "G"lobal user (read-write access) "R"eadonly (none) VMP 4.0 acceptable values 1 = Administrator 2 = Supervisor 5 = User 8 = Guest 9 = No access
Retrofitting requires that you find any explicit uses of Usr_Rights that specify/expect the former "S"/"G"/"R" values and update the accordingly. DO XXDTSRCH WITH "Usr_Rights", DO XXDTSRCH WITH "Supervisor", etc. Note that XXFWDATA.PRG establishes a default value of 5 for the Usr_Rights field. The following new fields have been added to the Users table (see XXFWDATA.PRG for the complete structure, rules, etc.) Existing apps to be migrated and existing VMP 4.0 apps need to have these new fields added to the Users table. Description This field allows specifying user records as "hidden" by setting to "Y". System/hidden users are not included in any VMP framework interfaces, views, etc. Usr_Active C 1 "Y" This field specifies the user as either active or inactive. Since referential integrity rarely allows physically deleting a user, use this flag to set a user "inactive" and therefore unavailable for picklist selections, etc. Usr_PhoneExt* C 4 Phone extension. Optional field, if omitted, VMP framework interfaces ignore without crashing. Usr_EnablePrefs* C 1 "Y" Indicates whether the user wants to run with User Preferences enabled. Optional field, if omitted user preferences are never enabled. Usr_LastLogin T 8 .NULL. Indicates the datetime of the last login for this user. Optional field, ignored if omitted. Usr_INTLLanguage* C 1 "Original" Indicates the language (Steven Black's INTL Toolkit feature) in which the user wants the applcation presented. If INTL Toolkit is not installed, this field is ignored and may be omitted. * these fields are optional as described above. In addition to these, the following existing Users table fields can be deleted and the VMP framework is "smart" enough to ignore them in the abstracted interfaces: Usr_Phone Usr_Fax Usr_Notes XXFWDATA.PRG no longer creates a V_Users view, and the VMP 4.0 framework does not use a V_Users view anywhere. You can remove V_Users from your VMP required database unless you are using it for purposes other than what is abstracted into the VMP framework (see the next paragraph regarding the replacement V_UsersList view). Also, the frmUsersMaintenance form in XXFWFRM.VCX has been removed and replaced by two forms in the new XXFWSEC.VCX. frmDEUsers is a users maintenance form when the optional VMP user security system is not installed. frmUserProperties is the users maintenance form when the optional VMP user security system is installed. For more information, see Chapter 27: User Security of the VMP 4.0 Reference Guide. XXFWDATA.PRG creates a new V_UsersList local parameterized view, which is required for VMP 4.0 applications; create it in your existing 3.0/3.01 apps being migrated to VMP 4.0. Note that the VFP View Designer cannot create the V_UsersList view properly. Copy-and-paste the code from XXFWDATA.PRG into your own utility program to generate the V_UsersList view in the database containing your Users table (or remote view). For more information, see Chapter 27: User Security of the VMP 4.0 Reference Guide. FieldName Usr_System DataType C Size 1 DefaultValue "N"
Page 25
The default USERS.Usr_Notes memo field is now optional. If you want to remove it (and its accompanying .FPT file), Visual MaxFrame Professional form classes that contain an editbox bound to Usr_Notes contain logic to also remove the editbox. XXFWDATA.PRG -- modified
No retrofitting required
No retrofitting required
However, if you implement the optional VMP user security system, you'll need to set icSecurityID for any .SCX-based forms you wish to secure. The XXDTSIT developer tool can be used to set the icSecurityID property for all .SCX-based forms automatically.
Retrofitting Instructions
If you have custom code in any of the above existing methods, they are likely to need modification. Note that HitEscape() has been removed, and its code moved to CancelAction(). If you prefer to treat such an attempted login to an inactive user account the same as any other failed login, override the new ActionI() method with the following line:
return THIS.ActionN()
No retrofitting required
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 26
When the APPCONFIG record for "LoginControl" is set to "None" (no user login is apparent to the user), calling oApp.Logout() does nothing. The VM example application includes a Logout option on the File menu. XXFW.VCX ctrApp Logout() new method OnTimer() modified cusUser UserLogin() -- modified XXFWMAIN.MNX modified to add a default "Log out" option to the File menu
No retrofitting required
No retrofitting required
Retrofitting Instructions
You aren't likely to have any explicit calls to oMenu.AddWindowMenuItem(), but you can DO XXDTSRCH WITH ".AddWindowMenuItem" just in case, and change any such calls to send only the one form object reference parameter.
Page 27
No retrofitting required
Retrofitting Instructions
No retrofitting required unless you have forms whose ilReadOnly can be set to .T. (see frmBase.SetReadOnly) and you don't like the defaults for these properties.
No retrofitting required
No retrofitting required
ENHANCEMENT: opening (local) views NODATA in the .SCX-based form DataEnvironment is much faster
VFP is faster at opening (local) views NODATA when SET DELETED is OFF. Another VMP 4.0 enhancement to XXFW.VCX/cusDBCSvc.OpenTable() abstracts this behavior when views are opened via calls to oLib.oDBCSvc.OpenTable(), but handling views opened implicitly in the native DataEnvironment of .SCX-based forms is a little tricky. This enhancement handles SETting DELETED OFF before the native DataEnvironment object of .SCX-based forms opens cursors and then SETs DELETED back to its VMP default ON afterwards. The necessary protections are in place to only execute this behavior when the DataEnvironment contains at least one view and all views have their NoDataOnLoad property set to .T. if views are to be opened WITH data, SET DELETED must be left ON to prevent DELETED() records from being retrieved into the view. Also, once the DataEnvironment has opened cursors, any tables that have their record pointer positioned to a DELETED() record (because they were opened with SET DELETED OFF) have their pointer repositioned to the first non-DELETED() record. XXFW.VCX frmData
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions VM4UPGRD.DOC
Page 28
SetDeletedOnOffAtLoad() new public method DEBeforeOpenTables() modified to call THIS.StandaloneSetup() and SetDeletedOnOffAtLoad() PrivateDataSessionSets() modified Load() modified to call SetDeletedOnOffAtLoad() cusPrivateDataSessionSets() Init() modified to remove the RETURN .F. XXDTNEWF.PRG modified to add comments to the auto-generated DE.BeforeOpenTables() line of code
Retrofitting Instructions
If you have subclassed XXFW.VCX/cusPrivateDataSessionSets(), you'll have to be sure to RETURN .T. from the Init(). Any forms/classes that have explicit Load() code (usually to add augmenting code) should be checked to make sure they make the callback before taking any action with respect to the open cursors. DO XXDTEPEM WITH "Load" to find all forms/form classes with explicit Load code, and make sure the callback is before any cursor-specific code (the VM example app had no forms/classes with Load code that needed modification, but it's good to make sure).
No retrofitting required
ENHANCEMENT: forms initially displayed offset to the previous form if they completely obscure it
When forms are instantiated, if they completely obscure the form that was up when they were called, the new form cascaded just below and to the right of the previously-active form. This behavior is intended as a visual aid to the average user, to make it clear that a new form is active, but the previous one is still there. XXFW.VCX frmBase SetInitialVisibleLocation() -- modified
No retrofitting required
MODIFICATION: base combo class contains Valid and adds a CustomValid() method
Combobox validation is a little different than that of other standard data-entry controls, consisting mostly of just simple "addon" behavior in most situations. This modification of XXFW.VCX/cboBase adds Valid code similar to that in other VMP "base" classes to handle high-level exceptions, and adds a CustomValid() method for your subclass/instance-specific "add-on" code. Please note the VFP does not appear to act on RETURNing .F. from the Valid() of a combo with respect to keeping focus in that combo (you can play with issuing NODEFAULT in the LostFocus() as a possible solution if you need that behavior). Also, beware that the When() event fires each time you move around in the combo, making it tricky to use an "ilValidFlag" like we do in other VMP "base" classes, where we reset it each time the When() fires. XXFW.VCX cboBase Valid() modified CustomValid() new method
Retrofitting Instructions
No retrofitting is required for combos that are working fine. You will want to put validation code in the new CustomValid() method for all future development.
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 29
XXFW.VCX/frmBase.CheckRequiredFields() contains code to recurse through all form members, looking for any whose custom Visual MaxFrame ilRequired property is set to .T. but whose .Value is empty()/null. As such, it was noticeably slow, especially on forms with lots of controls In this enhancement, frmBase.CheckRequiredFields() is virtually instantaneous, because controls whose ilRequired=.T. are now "registered" with the form, which can just loop through those controls on <Save>, rather than all members. In the public domain Visual MaxFrame files, frmBase.CheckRequiredFields() isn't actually called anywhere, but if you've called it manually anywhere, it's lots faster. In Visual MaxFrame Professional, CheckRequiredFields() is called by default early in the XXFWFRM.VCX/frmDataEntry.SaveAction() process. XXFW.VCX frmBase iaReqControls new public array property RegisterReqControls() new public method CheckRequiredFields() modified Init() modified Destroy() modified cboBase Init() modified ilRequired_Assign() new method chkBase Init() modified ilRequired_Assign() new method edtBase Init() modified ilRequired_Assign() new method opgBase Init() modified ilRequired_Assign() new method spnBase Init() modified ilRequired_Assign() new method txtBase Init() modified ilRequired_Assign() new method
Retrofitting Instructions
No retrofitting is required unless you set ilRequired in method code (setting it in the Properties Sheet is fine, no retrofitting required). If so, and in VFP 5.0 only (in VFP 6.0, the ilRequired_Assign() fires automatically on setting ilRequired in method code), replace calls like with
THIS.ilRequired = .t. THIS.ilRequired_Assign(.t.)
If you have any explicit calls to the Form.CheckRequiredFields() method (there are no such calls in the Visual MaxFrame Professional framework) that pass what was an optional parameter, note that it no longer accepts a parameter. The old code has been left in the CheckRequiredFields() method, so if you really need that behavior, or care to modify it to your needs, you can copy it to a new method and call that method passing the parameter.
ENHANCEMENT: Control.inRequiredBackColor property migrated to the app/user level rather than the control level
Controls whose custom Visual MaxFrame ilRequired property is set to .T. also display in the inRequiredBackColor, which defaults to cyan. This behavior has been moved from the individual control level to the User Preferences/APPINFO level, since it really isn't a per-control setting. This enhancement not only implements this change, but also introduces a mechanism to allow "broadcasting" app/user level changes to global objects in the current application session. XXFW.VCX cboBase inRequiredBackColor removed chkBase
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions VM4UPGRD.DOC
Page 30
inRequiredBackColor removed edtBase inRequiredBackColor removed opgBase inRequiredBackColor removed spnBase inRequiredBackColor removed txtBase inRequiredBackColor removed cusForms inRequiredControlBackColor new public property SetinRequiredControlBackColor new public method Init() modified OnToolsOptionsChange() modified XXFWDATA.PRG/APPINFO table A new APPINFO record "RequiredControlBackColor" sets the default value at the application level. However, if you provide an interface, each user can specify their preference, stored in the User Preferences table. If you have Visual MaxFrame Professional, see VMSSETUP.SCX VMTOPTS.SCX in the VM example application.
No retrofitting required
However, if you have already been mucking with inRequiredBackColor, you may have to modify what you've been doing. It's easier now that there is a single point of maintenance for the BackColor of all ilRequired controls.
No retrofitting required
Page 31
No retrofitting required
No retrofitting required
No retrofitting required
Retrofitting instructions
Generally, no retrofitting is required, but if you've customized any of the Standalone() methods or CustomStandalone() methods, you are likely to have to modify your code, especially if you've set any THISFORM.iaStandaloneStuff[] values, since that array has been moved to goStandaloneForms.iaStuff.
Page 32
OnFormDestroy() new method XXFWFRM.VCX pgfDEForms OnFormDestroy() new method frmDataEntry Destroy() -- modified
No retrofitting required
Retrofitting Instructions
You should have no retrofitting, because the default SET CENTURY setting for Visual MaxFrame applications is ON, which means that textboxes with the Century property left at their default setting always displayed all 4 digits of the year. This modification means that all 4 digits of the year are now displayed in txtBase textboxes regardless of the current SET CENTURY ON/OFF setting.
No retrofitting required
No retrofitting required
however, you may have to set your oUser.icUsersTableDatabase property explicitly to prevent oUser.Init() from crashing (to remind you, an X3WINMSG dialog lets you know why you crashed and what you need to modify).
Page 33
KeyPress() modified GotFocus() -- modified Year2000Strategy() removed inVFPVersion removed icContents -- removed
No retrofitting required
Retrofitting Instructions
If you have any labels that used this feature running under VFP 3.0b in VMP 3.01, replace those label instances with other necessary code. You should be able to redefine them to instances inheriting from XXFWCTRL.VCX/txtLabel. To find any such labels that need retrofitting, DO XXDTEPEM WITH "BoundCaption".
No retrofitting required
Retrofitting Instructions
If you have created any ctrPicklistValid subclasses that include a "lookup" button, you need to redefine those buttons to inherit from XXFWCOMP.VCX/cmdPicklistValid. Note that you may need to create intermediate/app-specific subclass(es) of cmdPicklistValid first, and then redefine your instances to inherit from those class(es).
Page 34
CommonTextboxKeypress() modified
No retrofitting required
Retrofitting Instructions
No retrofitting required unless you have explicit code in the TimerAction() of the timer on forms inheriting from frmDEGridNav2Pages/frmDEGridNavNoPages. DO XXDTEPEM WITH "TimerAction" to find any such code.
No retrofitting required
No retrofitting required
Page 35
The three commandbutton classes in XXFWPICK.VCX are not necessary, and only bloat the .VCX. They have been removed. The commandbuttons on XXFWPICK.VCX/frmPicklist have been re-defined to come from the appropriate existing VMP commandbutton classes, and form functionality is identical to what is was in previous versions of VMP. Also, the custom XXFWPICK.VCX/frmPick.SelectAction() method has been removed and its contents migrated to the standard VMP form method OKAction(). Again, the actual behavior is unchanged. XXFWPICK.VCX frmPick SelectAction() removed OKAction() modified to contain what was in SelectAction() cmdPicklistAdd removed cmdPicklistCancel -- removed cmdPicklistOK removed
Retrofitting Instructions
If you had any explicit SelectAction() code, you'll need to migrate it to OKAction. DO XXDTEPEM WITH "SelectAction" to find any such overriding/augmenting code. DO XXDTSRCH WITH ".SelectAction(" to find any explicit calls to this method, replace them with calls to OKAction(). Any PEM modifications you might have made (unlikely) to the 3 commandbuttons on XXFWPICK.VCX/frmPicklist should be OK because the existing commandbuttons on the form class were simply re-defined to inherit from existing VMP classes.
No retrofitting required
No retrofitting required
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 36
In order to fully support the 3 parameters that can be sent to the picklist form summoned on an invalid entry or hotkey lookup, two new properties have been added to XXFWCTRL.VCX/txtPicklistValid. The property values are processed in the DoPicklistForm() method into the 2 nd and 3rd optional parameters sent to the picklist form, reducing the need to subclass txtPicklistValid.DoPicklistForm() in order to send the filter condition. XXFWCTRL.VCX txtPicklistValid icPicklistFormFilter new public property ilPicklistFormAddButton new public property DoPicklistForm() -- modified
No retrofitting required
No retrofitting required
No retrofitting required
No retrofitting required
Page 37
No retrofitting required
ENHANCEMENT: ctrMover Selected cursor does not have to have a single field matching .lstAvailable.RowSource
When the mover is used with cursors, you can present a field expression in the Selected listbox without having to have a single field in the .icSelectedCursorName cursor that exactly matches the current .lstAvailable.RowSource only the field expression must match. XXFWCOMP.VCX ctrMover icSelectedCursorFieldExpr() new public property OnUpdateFormOnNav() modified RemoveAction() -- modified
No retrofitting required
No retrofitting required
No retrofitting required
unless, of course, you've kludged a workaround in the past and can now eliminate that code and simply fill in the new icProximityLabel property.
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions VM4UPGRD.DOC
Page 38
No retrofitting required
ENHANCEMENT: ctrMover removes the ".f." line when there are no Available items
When there are no Available items and you're using arrays in XXFWCOMP.VCX/ctrMover, the default VFP behavior is to display a ".f." on the first line of the listbox, since its RowSource is an empty one-cell array. This enhancement suppresses that ".f.", leaving the listbox truly empty. XXFWCOMP.VCX ctrMover OnUpdateFormOnNav() -- modified
No retrofitting required
Retrofitting Instructions
No retrofitting is required unless you passed parameters to your instances/subclasses of frmChangePassword it's Init() no longer accepts parameters, and it no longer supports being called standalone from the Command Window.
No retrofitting required
Retrofitting Instructions
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 39
Move your old mover.UpdateMoverOnNew() code to the new OnUpdateFormOnNew(), inherited from XXFWCOMP.VCX/ctrDERegisteredComposite. To see if you have any such code to move, DO X3DTEPEM WITH "UpdateMoverOnNew" on your existing VMP 3.01 application. Note that the ctrMover instance on XXFWFRM.VCX/frmMover is, of course, this newly-redefined ctrMover.
Retrofitting Instructions
Retrofitting requires eliminating the parameters from any manual callbacks in your form classes/instances. To find them, DO XXDTEPEM WITH the following: "UpdateFormOnSave" "UpdateFormOnCancel" "CheckIfOnDeletedRecord" "Activate" If you find any such code, you should also replace any explicit references to the passed (tcPreviousMode) parameter with pcMode.
No retrofitting required
FEATURE: Shortcut menu for editboxes contains Print and Print Preview options
The default shortcut menu for VMP editboxes now has 2 additional options: Print and Print Preview, allowing the user to preview/print out a quick-and-dirty report from XXTBLOCK.FRX of the editbox contents.
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions VM4UPGRD.DOC
Page 40
The new XXTBLOCK.FRX report form can be built right into the distributed .EXE. The default report object is frmReportTextBlock, but you can create/subclass your own if you'd rather, and specify it in the shortcut menu icEditboxReportClass property. The called report form XXTBLOCK.FRX matches the font properties for the single item in the Detail band (for the contents of the calling editbox.Text) to the font properties of the editbox which invoked the shortcut menu. XXFWMISC.VCX cusShortcutMenu EditboxDefaults() modified to add the 2 new menu items EditboxMenuActions() modified to add code when either of the 2 new menu items are selected icEditboxReportClass new public property allows specifying a different report object in subclasses XXFWMISC.VCX frmReportTextBlock new class the default report object called from the 2 new shortcut menu items XXTBLOCK.FRX new VMP report form, executed by the new XXFWMISC.VCX/frmReportTextBlock.ReportForm()
No retrofitting required
ENHANCEMENT: Caption of Zoom form (frmMemoEdit) can be set to explicit string when called from an editbox shortcut menu
When the Zoom form is called from the default shortcut menu of an editbox, the Zoom form Caption can now be set to something other than the default "Notes" (the shortcut menu doesn't/can't pass the optional 3 rd parameter to the frmMemoEdit/Zoom form). Just set the icZoomFormCaption property of VMP editboxes to the desired caption, and code in frmMemoEdit.Init() uses it when the explicit tcCaption parameter hasn't been passed. XXFW.VCX edtBase icZoomFormCaption new public property XXFWFRM.VCX frmMemoEdit Init() -- modified
No retrofitting required
ENHANCEMENT: Zoom form (frmMemoEdit) called from shortcut menu defaults when no user preferences in effect
XXFWFRM.VCX/frmMemoEdit now sets the font properties of the editbox to match those of any "calling" editbox. Also, XXFWFRM.VCX/frmMemoEdit now sets its Height/Width to a default of SYSMETRIC(1/2) *.7 if no user preferences are in effect. XXFWMISC.VCX frmMemoEdit Init() -- modified edtBound1.RestorePrefs() -- modified
No retrofitting required
Retrofitting Instructions
The VMP 3.01 classes in the list below have been moved to XXFWCOMP.VCX. For each one, if you have created appspecific subclasses, you'll have to use the Class Browser, XXDTHACK.VCX, or otherwise redefine them to inherit from the same class as before, but now located in XXFWCOMP.VCX: ctrGetFile (from XXFWMISC.VCX)
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions VM4UPGRD.DOC
Page 41
No retrofitting required
No retrofitting required
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 42
cmdVMPicklistValid new class VMTXTPCK.VCX ctrPicklistValidStyle1 new class ctrPicklistValidStyle2 new class ctrCusNamePicklistValid new class ctrPicklistValidStyle2D new class ctrCityNamePicklistValid new class ctrPicklistValidStyle3 new class ctrPicklistValidStyle3D new class VMDECUSZ.VCX new example form demonstrates several variations VMDEINVL.SCX, VMDEINV2.SCX, VMDEINVA.SCX implement the new ctrCusNamePicklistValid
No retrofitting required
No retrofitting required
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions VM4UPGRD.DOC
Page 43
No retrofitting required
No retrofitting required
No retrofitting required
No retrofitting required
Retrofitting Instructions
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 44
No retrofitting is actually required, since existing txtPicklistValid controls cannot be using the new "unbound" feature, introduced in this version of VMP. Existing txtPicklistValids that use the AlternateLookup() method are OK, but if you get a chance, it would be a good idea to set the ilAlternateLookup property to .T. anyway. DO XXDTEPEM WITH "AlternateLookup" to find any such existing txtPicklistValids.
No retrofitting required
No retrofitting required
Retrofitting Instructions
No retrofitting required unless you have explicit pageframe.OnUpdateFormOnAdd() code to handle this manually. DO XXDTEPM WITH "OnUpdateFormOnAdd" to hunt down explicit methods and make any necessary updates, if any (if all you have in those methods is a callback plus augmenting code, no change required).
No retrofitting required
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 45
The new XXFW.VCX/pgfBase.inActivePageOnSelection property defaults to 2 and allows you to specify the ActivePage when the user makes a selection in a navigational control in the containing form. This property everywhere in the VMP framework except in XXFWFRM.VCX/frmDEGridNav2Pages.pgfPageRefresh1.Page1.grdNav.SelectionMade() (Visual MaxFrame Professional only). You can use this property in form classes of your own creation that need a similar behavior. XXFW.VCX pgfBase inActivePageOnSelection new public property XXFWFRM.VCX frmDEGridNav2Pages pgfPageRefresh1.Page1.grdNav.SelectionMade() modified
No retrofitting required
Retrofitting Instructions
No retrofitting required unless, for some unknown reason, you have RETURNed something from your ShellAddtionalInit() code.
Retrofitting Instructions
If you have any method code that refers to either label (i.e. to dynamically update the Caption, etc.), then you'll need to update the object references accordingly.
Retrofitting Instructions
In previous versions of VMP, the icDialogCaption property was used for the GETFILE() parameter #2 DO XXDTSRCH/XXDTEPEM with "icDialogCaption" to see if you have any explicit settings that need updating to specify an icFileNameCaption and/or change the existing icDialogCaption.
No retrofitting required
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 46
No retrofitting required
No retrofitting required
No retrofitting required
Retrofitting Instructions
No retrofitting unless you want the old default behavior, in which case you need to set the APPCONFIG.Ap_ItemVal for the "FormQueryUnload" record to "3".
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 47
Until now, the order in which tables/views/cursors are TABLEUPDATE()d in XXFW.VCX/frmData.UpdateBuffers() has been determined by their position in the AUSED() array. There are situations in which you need to ensure that one or more cursors (particularly tables) get TABLEUPDATE()d before one or more other cursors. This enhancement allows you to update the 10th/sequence column in the paCursors array, indicating the relative order of TABLEUPDATE(). See the header comments in the new XXFW.VCX/frmData.SpecifyTableupdateSequence() method. XXFW.VCX frmData UpdateBuffers() modified SpecifyTableupdateSequence() new method
No retrofitting required
Retrofitting Instructions
If you have any calls to the .GetMainAliasInfo() method, replace them with calls to .GetCursorInfo(). To find any such calls, DO XXDTSRCH WITH ".GetMainAliasInfo" once you've got a copy of your app in VMP 4.0. The GetMainAliasInfo() method was not called anywhere in the VMP framework.
No retrofitting required
No retrofitting required
ENHANCEMENT: Easier record pointer repositioning after <Add> in view-based picklist forms
XXFWPICK.VCX/frmPick.SetRecordPointerOnAdd() has been enhanced to make it easier to reposition the record pointer in THISFORM.icMainAlias when THISFORM.icMainAlias is a view, and therefore has no natural primary key field/value/tag. The new icSetRecordPointerOnAddTag property can be used to specify a tag for repositioning.
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 48
XXFWPICK.VCX frmPick icSetRecordPointerOnAddTag new property SetRecordPointerOnAdd() modified zReadMe() updated frmPickList zReadMe() updated
No retrofitting required
No retrofitting required
GRIDS
ENHANCEMENT: all grids now inherit incremental-search capability
The incremental-search capability formerly built into grids inheriting from grdPicklist has been migrated to grdGeneral, so all VMP grids (including data-entry grids) can now include a Look For: textbox and do incremental searching based on the current column contents. XXFWGRD.VCX grdGeneral icSeekPrefix migrated here from grdPicklist icFindTextboxName migrated here from grdPicklist SeekValue() migrated here from grdPicklist RegisterWithTextbox() migrated here from grdPicklist GetFindTextboxObjRef() migrated here from grdPicklist SelectionMade() migrated here from grdPicklist Init() modified to call RegisterWithTextbox() XXFWPICK.VCX grdPicklist icSeekPrefix reset to default icFindTextboxName reset to default SeekValue() reset to default RegisterWithTextbox() reset to default GetFindTextboxObjRef() reset to default
No retrofitting required
Page 49
grdDataEntry inPrefillTotal new property Prefill() new method Init() modified Destroy() modified AfterRowColChange() modified DeleteCurrentRow() modified OnFormDeleteAction() modified OnUpdateFormOnCancel() modified XXFWFRM.VCX frmDataEntry DeleteAction() modified
No retrofitting required
Retrofitting Instructions
No retrofitting is required unless you have explicit SeekInGrid (txtPicklistFind subclasses) or SeekValue (grdGeneral subclasses) code. DO XXDTEPEM WITH "SeekInGrid", DO XXDTEPEM WITH "SeekValue" to find any such explicit code.
No retrofitting required
Retrofitting Instructions
If you've used this property for anything, you'll have to find another way to get the job done <g>. DO XXDTSRCH WITH "inAddCounter" to see if you have any explicit .inAddCounter references that need attention.
Page 50
No retrofitting required
No retrofitting required
Retrofitting Instructions
It is highly unlikely (but theoretically possible) that you were using the "add-on-the-fly" behavior in association with the RecordSource of a data-entry grid, but, if so, see the header comments for XXFWFRM.VCX/frmDataEntry.SaveUpdateAddOnTheFlyRecord() for instructions on how to make it work when THISFORM.icAddOnTheFlyAlias is the RecordSource of a data-entry grid.
No retrofitting required
Page 51
inLeftmostSortableColumnHeaderPropSwap new
No retrofitting required
However, if you've modified the default VMP grid behavior, you'll want to switch to using the tools included here.
No retrofitting required
No retrofitting required
REMOTE DATA
FEATURE: New class providing connection services for remote data applications
The new cusConnectionSvc class definition in XXFWLIBS.VCX is instantiated to oLib.oConnectionSvc() by an new oApp.SetupRemoteDataServices() (even if your app uses only local data). For remote applications, you can substitute your own "connection services" object (usually a subclass of XXFWLIBS.VCX/cusConnectionSvc) by updating your APPCONFIG record for "oLib.oConnectionSvcClass". In addition to basic services via custom methods, the ODBCErrorMessage() method is a "hook" where you can fire your own ODBC-error-message routine to present messages to the user when AERROR() reports an error 1526. XXFWLIBS.VCX cusConnectionSvc new class XXFW.VCX ctrApp Init() modified SetupRemoteDataServices() new method MSGSVC.DBF New records to handle messages generated in this class see the MSGSVC.cWhere field New records to handle messages generated in oApp.SetupRemoteDataServices() see the MSGSVC.cWhere field XXFWDATA.PRG/APPCONFIG table New "oLib.oConnectionSvcClass" record specifies the ClassName,.VCXFileName of the class to be instantiated to oLib.oConnectionSvc by oApp.SetupRemoteDataServices(), defaults to "cusConnectionSvc,XXFWLIBS.VCX", no need to modify unless you want to instead instantiate a subclass of XXFWLIBS.VCX/cusConnectionSvc. XXFWDATA.PRG/APPINFO table The app-specific APPINFO table contains new records where the developer can specify (and the system administrator can maintain):
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 52
"BusyConnectionTimeout" specifies the number of seconds, on encountering a busy connection, the executing query/connection/SQL operation aborts/times out. Number of seconds after which, if a connection handle continues to be busy, the SQL operation is aborted. Defaults to 2, see also XXFWLIBS.VCX/cusConnecionSvc.BusyConnection(). "BusyConnectionRetryInterval" Interval at which to retry a busy connection. Defaults to .2 seconds. See XXFWLIBS.VCX/cusConnecionSvc.BusyConnection() "QueryAllowUserToRetryWhenBusy" -- Establishes oLib.oConnectionSvc.ilQueryAllowUserToRetryWhenBusy, used as the default value of the optional 3rd parameter of XXRQUERY() and XXSQLEXE() functions. See also XXFWLIBS.VCX/cusConnectionSvc.SetProperties() "QueryPresentErrorMessage" -- Establishes oLib.oConnectionSvc.ilQueryPresentErrorMessage, used as the default value of the optional 4th parameter of XXRQUERY() and XXSQLEXE() functions. See also XXFWLIBS.VCX/cusConnectionSvc.SetProperties() "QueryShutdownIfProblem" -- Establishes oLib.oConnectionSvc.ilQueryShutdownIfProblem, used as the default value of the optional 5th parameter of XXRQUERY() and XXSQLEXE() functions. See also XXFWLIBS.VCX/cusConnectionSvc.SetProperties() "TestConnectionSQL" -- SQL-Select statement that retrieves one-record/one-field as fast as possible, for checking valid connections in XXFWLIBS.VCX/cusConnectionSvc.TestConnection() (see the notes there for more info)
No retrofitting required
No retrofitting required
No retrofitting required
Page 53
CustomPasswordValid() -- modified
No retrofitting required
No retrofitting required
No retrofitting required
Retrofitting Instructions
If you had code in a Form.SaveODBCMessageOnFailure() method, you need to move it to XXFWLIBS.VCX/cusConnectionSvc.ODBCErrorMessage(). DO XXDTEPEM WITH "SaveODBCMessageOnFailure" to find any such explicit code.
No retrofitting required
No retrofitting required
Page 54
The VM example application includes a new "Remote Data" menu. If you have SQL Server running, you can use the options on this menu to connect to the sample Pubs database that ships with SQL Server and run several example forms. The forms automatically switch between local VFP data mirroring the Pubs database and the remote Pubs data. Here are the new/modified files: VMMAIN.MNX -- modified VMPUBDAT.PRG -- new VMPUBCON.SCX -- new VMDEPUBS.SCX -- new VMCONECT.PRG -- new VMREMINF.SCX -- new
No retrofitting required
ENHANCEMENT: turn off VMP generation and population of PKs and FKs
A new ilGenKeys property on XXFWFRM.VCX/frmDataEntry allows you to suppress the default VMP behavior of generating and populating primary keys (and foreign keys when the form contains cusChildCursorSvc object(s) to handle child cursors). This is primarily intended for use with remote tables whose keys are maintained in identity columns. XXFWFRM.VCX frmDataEntry ilGenKeys new public property GenAndPopPK() modified GenPK() -- modified
No retrofitting required
No retrofitting required
Retrofitting Instructions
If any of your report object classes inheriting from XXFWMISC.VCX/frmReport contain BeforeReportForm() or AfterReportForm() code, be sure you are making the manual callback to these previously-empty (at the VMP framework level) methods. DO XXDTEPEM WITH "AfterReportForm" and "BeforeReportForm" to track down any such methods in your project.
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 55
XXFWMAIN.MNX has new default Print and Print Preview menu options under the File menu. The Command simply calls _Screen.ActiveForm.PrintAction(<parameter>), and the SKIP FOR condition calls a new oMenu.PrintSkipForCondition() custom method. Also, a call to the new oMenu.EnableFileMenuPrintItems() method has been added to frmBase.GotFocus(), so that modal forms can also have Print and Print Preview menu options enabled. XXFW.VCX cusMenu PrintSkipForCondition() new public method EnableFileMenuPrintItems() new public method frmData PrintAction() method code remains intact, but this method is now established in frmBase frmBase PrintAction() this method now established here so that all Visual MaxFrame forms have a PrintAction() method GotFocus() modified to call oMenu.EnableFileMenuPrintItems() for modal forms XXFWMAIN.MNX new File/Print menu option (see both the Command and the SKIP FOR condition) new File/Print Preview menu option (see both the Command and the SKIP FOR condition) MSGSVC.DBF Several new Print and Print Preview records
Retrofitting Instructions
No retrofitting required, although you should check the XXFW.VCX/cusMenu.PrintSkipForCondition() to see if it meets your needs if you decide to include this menu option in your applications. If you have Visual MaxFrame Professional, note that the Form.PrintAction() method now receives a parameter when called from the 2 new default menu bars if you decide to use them, you'll have to modify your existing PrintAction() methods to insert the lParameters tcOutput parameter and pass it on to the report as the 3 rd parameter (see the forms in the VM example application, VMDECUS.SCX for example). To find all your forms that have explicit PrintAction() code, DO XXDTEPEM WITH "PrintAction".
No retrofitting required
Retrofitting Instructions
No retrofitting is required to existing apps unless, of course, you have report objects whose class name plus .VCX filename exceeds the previous default of 40 characters for the Rep_Class field.
No retrofitting required
FEATURE: New X3GOURL.PRG routine to fire the web browser, pointing to a passed URL
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions VM4UPGRD.DOC
Page 56
X3GOURL.PRG is the utility Rick Strahl published in his article in the March 1998 FoxPro Advisor Magazine. It fires up the web browser (or other associated application) for the passed URL/file. It is demonstrated in the VM example application in the Help menu, which contains an option for www.maxlink.com/vmpmain.htm. X3GOURL.PRG new program VMMAIN.MPR new www.maxlink.com/vmpmain.htm option on the Help menu
No retrofitting required
No retrofitting required
No retrofitting required
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 57
XXFWLIBS.VCX/cusDBCSvc.OpenTable() has been modified to SET DELETED OFF and SET OPTIMIZE OFF before opening tables and NODATA views. This speeds up: 1. opening a table, especially noticeable when tables contain large numbers of records and any number of deleted() records 2. opening a (local) view NODATA XXFWLIBS.VCX cusDBCSvc OpenTable() modified
No retrofitting required
No retrofitting required
or
X3GETVER.PRG -- removed
Retrofitting Instructions
No retrofitting required unless you've got X3GETVER() calls in your app-specific code, in which case you'll need to modify them as indicated above. DO XXDTSRCH WITH "X3GETVER" to find any such calls.
No retrofitting required
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 58
No retrofitting required
No retrofitting required
No retrofitting required
No retrofitting required
No retrofitting required
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 59
Retrofitting instuctions
Since views opened via the OpenTable() method (of oLib.oDBCSvc or an instance of cusDBCSvc added to a form) are now open with optimistic table buffering, if you immediately create index tag(s) without setting buffering to 3 to create the tags and then to 5 afterwards, you will have to update your code to do so. Otherwise, your INDEX ON command(s) will fail due to table buffering in effect rather than row buffering.
No retrofitting required
Retrofitting Instructions
X3CSVORT.PRG only returned one of the following values: "T" "R" "L" SPACE(0) but X3SRCTYP.PRG returns one of the following: "VR" "VL" "OVR" "OVL" "TC" "TF" "SPT" "C" The calls to X3CSVORT.PRG in the framework have been updated, but retrofitting of existing apps requires checking all existing X3CSVORT.PRG calls to make sure they check for the correct new value(s). Hunt down possible retrofits by Doing XXDTSRCH WITH "X3CSVORT".
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 60
No retrofitting required
No retrofitting required
No retrofitting required
No retrofitting required
No retrofitting required
Page 61
XXFWCTRL.VCX/cmdDataSave.UpdateAddOnTheFlyRecord() has been updated, and the revised code includes a call to X3VTABLE.PRG. X3VTABLE.PRG new file XXFWCTRL.VCX cmdDataSave UpdateAddOnTheFlyRecord() -- modified
No retrofitting required
No retrofitting required
MODIFICATION: specify EXCLUSIVE/SHARED for both the database and tables in XXFWLIBS.VCX/cusDBCSvc.OpenData()
Starting in VFP 5.0, you don't have to have a database open EXCLUSIVE to peform maintenance chores on its tables. So this modification allows you to pass the optional 3 rd parameter to oLib.oDBCSvc.OpenData() as a string containing two logical values, one for the database and one for the tables to be opened if tlDataOnly is .F. XXFWLIBS.VCX cusDBCSvc OpenData() -- modified
No retrofitting required
Retrofitting Instructions
See the description for this enhancement.
No retrofitting required
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 62
X3RLB.PRG is a library routine to Refresh Local Buffer of the passed alias. In some situations you may find it necessary to manually refresh the local buffer of a VFP table so that a subsequent SQL-SELECT or USE <ViewName> gets the latest information on disk rather than what VFP has currently buffered on the current workstation. XXRLB.PRG new file
No retrofitting required
DEVELOPER TOOLS
ENHANCEMENT: A.PRG/DrillDown() hotkey
A.PRG contains a local DrillDown procedure that makes it easier to execute the Select/Rightclick/<select Edit> action to drill down into containers like pageframes. It is fired on an {F3} ON KEY LABEL. If you have Visual MaxFrame Professional, try the following to see the most impressive part of this feature (assuming you've run A.PRG to setup the {F3} hotkey): 1. MODI FORM VMDECUS4 2. position the mouse over the Tab/Caption of any page other than the showing Page1 3. {F3} A.PRG -- modified DrillDown() new local procedure
No retrofitting required
No retrofitting required
unless you don't like that setting, in which case you should take the necessary action in ASETUP.PRG or whatever
No retrofitting required
ENHANCEMENT: XXDTSRCH finds more strings, fires the Class Browser, etc.
The XXDTSRCH tool now finds the specified string in the following locations not previously checked: description for a .VCX file description for an individual class library in a .VCX file any field in APPINFO, when the VMP-required .DBC is in the project (recommended) any field in APPCONFIG, when the xxCONFIG.DBF is in the project (recommended)
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 63
any field in GENERATEPK when the VMP-required .DBC is in the project and it includes a GENERATEPK table any field in REPORTCATALOG when the VMP-required .DBC is in the project and it includes a REPORTCATALOG table any field in xxUSYSSI.DBF, when it exists and is in the project (recommended part of the Visual MaxFrame Professional optional user security system) any field in MSGSVC.DBF, when it is in the project (recommended) any field in STRINGS.DBF, when used and when it is in the project Free tables that are in the project but are not in the above list are listed in the listbox to indicate that they are in the project but have not been "processed", or checked for the passed string. When focus is on a line for a .VCX file or the description for a .VCX file, the first shortcut menu bar/<Modify> button selection loads that .VCX in the Class Browser. When focus is on a line for a .DBF item, the first shortcut menu bar/<Modify> button BROWSEs that table, and if the selected listbox line is for an individual/specific record in the table, the BROWSE is presented with that record selected. The dialog contains two new checkboxes for specifying options for the search string: Match case? Alltrim() the string?
No retrofitting required
No retrofitting required
No retrofitting required
Retrofitting Instructions
You can delete all SuperCls*.* files in your \XLIB directory, using the old VMP 3.0 setup, replacing them all with the single SUPERCLS.APP that ships with VMP 4.0. Or, the SUPERCLS.APP that ships with VMP 4.0 can be anywhere in your VFP path (if you want the VMP-modified SuperCls, then don't include the SuperCls directly from Ken Levy in your VFP path).
Page 64
No retrofitting required
No retrofitting required
No retrofitting required
No retrofitting required
Retrofitting Instructions
If you've used any XXWB.VCX "xxxBase" classes in your own tools/wizards/builders/etc., you'll have to redefine any that inherit from XXWB.VCX/"xxxBase" classes. Don't forget methods with scope resolution operator callbacks: xxxBase::Callback() xxxWBBase::Callback().
Page 65
No retrofitting required
No retrofitting required
ENHANCEMENT: XXDTPOPC.PRG utility handles .NULL.s, better support for large numbers of output files, unambiguous date constants
The XXTOOLS.VCX/cusCreatePopCode utility called by DOing XXDTPOPC has been enhanced to: handle .NULL. field values properly not "chain" together the programs, but rather call them all in a loop at the end of the first one create unambiguous date/datetime constants XXTOOLS.VCX cusCreatePopCode Init() modified NoCRLF() -- modified
No retrofitting required
No retrofitting required
ENHANCEMENT: XXDTPOPC.PRG utility calls a dialog where you can enter information passed as parameters to XXTOOLS.VCX/cusCreatePopCode
XXDTPOPC.PRG now instantiates a dialog where you can easily enter information passed to XXTOOLS.VCX/cusCreatePopCode. XXTOOLS.VCX frmXXDTPOPC new class XXDTPOPC.PRG -- modified
No retrofitting required
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 66
No retrofitting required
MISCELLANEOUS
MODIFICATION: no VFP 3.0b support
Starting with VMP v4.0, VFP 3.0b is no longer supported. If your applications must run in VFP 3.0b, use VMP 3.01. In addition to the fact that VFP 3.0b-specific code has been removed from various .PRGs and method code, the following other files have been affected: X3BLDTXT.SCX -- deleted XXBUILDR.PRG -- modified VMP3TO5.PRG deleted XXFW.VCX/frmBase.SetAllSelectedBackColor() -- deleted
No retrofitting required
No retrofitting required
No retrofitting required
No retrofitting required
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 67
The note in XXFW.VCX/ctrApp.zReadMe() that explains icSubclassingPotential now adds a paragraph explaining that you can use icSubclasslingPotential as a "temporary property" at runtime, to store anything you want, because its value is never queried in the framework, only its existence . XXFW.VCX all xxxBase classes ilVM removed icSubclasslingPotential changed to public scope
Retrofitting Instructions
If you have any explicit code that references the removed ilVM property, you'll have to change those references to icSubclassingPotential instead. DO XXDTSRCH WITH "ilVM" to find any such references.
No retrofitting required
No retrofitting required
No retrofitting required
No retrofitting required
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 68
VMDECUSQ.SCX new form example VMDECUSR.SCX new form example VMMAIN.MNX -- modified
No retrofitting required
No retrofitting required
No retrofitting required
No retrofitting required
No retrofitting required
ENHANCEMENT: utility to switch the VM example app to run with/without the optional VMP user security system
The \VM\DVSTUFF directory/folder in the VM example application contains a new VMDVOSEC.PRG, to switch the VM example app to run with/without the optional VMP user security system. Just DO VMDVOSEC. VMDVOSEC.PRG new utility file
No retrofitting required
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 69
Retrofitting instructions
For existing apps, increase the size of UserPrefs.Prf_ItemVal from C(100) to C(254).
No retrofitting required
No retrofitting required
No retrofitting required
No retrofitting required
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 70
No retrofitting required
No retrofitting required
No retrofitting required
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 71
Retrofitting Instructions
text here
Visual MaxFrame Revision History, version 4.0 1998-1999 Metamor Industry Solutions
VM4UPGRD.DOC
Page 72