home *** CD-ROM | disk | FTP | other *** search
/ Developer Source 3 / Developers_Source_Vol_03_1996.iso / parad / aug94 / pg87b.gif < prev    next >
Graphics Interchange Format  |  1995-09-26  |  145KB  |  1628x2017
Labels: text
OCR: gertips How do I associate a Form variable to the form that is executing - that is, from within itself? IP ATTACH :: #Form1 :: open + You use the same method you would use to associate a form method open(var eventInfo Event) variable with any form, i.e. the Form attach method. You just if eventInfo .isPreFilter () then ; This code executes for each object on the form. don't supply an argument. This indicates that you want to else ; This code executes only for the form. attach to the current form. doDefault if not ThisForm. attach() then errorShow( ) Figure 4 provides an example. Note that ThisForm has been else declared as a Form variable in the form's Var window. It's endIf message ("All is well") endIf also important to note that the doDefault command is issued T before executing the attach statement. doDefault should endMethod + always be used in this manner within an open method to Edit Line: 1 Col: 1 insure that all the object's open-related activity is completed before trying to manipulate the object. Figure 4: This built-in open method shows how to use the attach method to associate a Form variable to the current form. Pressing F7) while on a form displays a Table window. How do I disable this key? [F7 is one of many function keys you may wish to disable. Reference. They're also available in on-line help. Just search To do this, modify the form's keyPhysical method to appear on "keyboard". Depending on the situation you might also as shown in Figure 5. This code traps the KeyEvent by using want to add the statement: the vCharCode method to examine the eventInfo packet. Note that the KeyEvent must be trapped before it is message("Table View disallowed") prefiltered by the form. following the beep procedure call. This will cause a message In this case, we're looking for the Windows keycode, to be displayed in the Status bar at the bottom of the PW VK_F7. Other keys can be disabled in the same way Desktop. simply use the appropriate keycode value. All the Windows keycodes are listed in Appendix C of the ObjectPAL KEYPHY'S :: #Form1 :: keyPhysical Got a Tip, Answer, or Problem? method keyPhysical(var eventInfo KeyEvent) if eventInfo.isPreFilter() then Do you have a great Paradox for Windows tip you'd like ; This code executes for each object on the form. to share with others? Did you find a great way to solve if eventInfo .vCharCode() = UK_F7 then disableDefault a PW dilemma? Do you have a problem that you can't beep() I figure out on your own? If the answer to any of these endIf else questions is "yes", send 'em in. If we use your tip, ; This code executes only for the form. endIf answer, or problem here we'll send you a Paradox endMethod Informant canvas tote bag! Send all correspondence to CompuServe ID 70304,3633, MCI Mail ID JCoffey, or 1+ mail it to Paradox Informant, "ATTN: Tips", 10519 E. Edit Line: 1 Col: 1 Figure 5: This modified keyPhysical Method disables the Table View Stockton Blvd, Suite 142, Elk Grove, CA 95624-9704. [ [F7] ) key. UST 1994 PARA ANT 87