Log In    |    Knowledge Base    |    4D Home
Tech Tip: Making Project Methods Invisible
Published On: September 21, 2001

People do the darndest things!

Methods are written to perform useful functions in our databases. We take care to ensure that our methods execute at the appropriate time and are used in the right context. However, methods executing out-of-context, or at the wrong time, can have disastrous effects to data integrity. Therefore it is imperative that we prevent curious individuals from inadvertently executing methods at random.

If you allow users access to the 4D User environment, it is through the Special menu that they can execute any method listed in the Execute dialog. In addition, if you include 4D Write with your database, it is fairly easy to have users execute methods within 4D Write documents as well.

Whether you allow access to the 4D User environment or not, chances are you do provide access to the 4D Label Editor. On the "Layout" page of the Label Editor, a very useful "Method to apply" popup contains all of your methods! A user can select one method, hit the print button, and that method is going to execute!

Fortunately, there is an easy way to prevent users from seeing the methods you do not want them to see. In the Design environment, while a method is open, the "Method" menu is available. Select "Method Properties..." from the Method menu to open the dialog. Checking the "Invisible" checkbox will effectively "hide" that method from your user's view in all 4D dialogs where your methods could possibly appear.