Using Wrappers - Effective Programming in FileMaker
Learning to code a better FileMaker solution is something that happens over time. As you improve, there are all kinds of things you find that make the development process more streamlined.
Some of your application logic becomes repetitive in many locations. Think about using the Show Custom Dialog script step (I use this example in the video). How many places have you used it in your solution(s)?
Having to update this code can become quite the hassle down the road. This is where you come to the point of resolving to "code once", and by doing so, you only have one location to update the code.
While this approach can be taken to the extreme, it's a great thing to know. Using wrappers around native FileMaker script steps and functions can help you out in the long run - I promise!
Comments
Bug with the naming convention - FYI
I dig the use of wrappers in filemaker. In particular I'm using the Env.get custom function a lot now. Saves me a ton of time however I think I found a bug with the use of the period (".") character in the name of the function.
To reproduce, I have to have my files hosted. I have my file open remotely. I'll create the custom function with the period character. I can save it just fine and reference it in my scripts. When the file is opened again after closing the file, the custom function sort of disappears in that there's a blank entry in the custom functions list. However, I can't edit the function or delete it and the reference to it in my scripts are broken.
Removing the period character from the name does not produce the bug.
This was tested with 2 different solutions.
Hardware: Server running Mac mini (PPC); Client running mac mini (dual core Intel)
Software: FileMaker Server 9v3; FileMaker Advanced 9v3