RATING: Intermediate
PLATFORM: Macintosh & Windows
VERSION: FileMaker 6
TECHNIQUE FILES: CustomDialogs.fp5
The Show Custom Dialog feature is a very welcome addition to FileMaker Pro 6 and FileMaker Developer 6. Now Users can be presented with context-sensitive dialogs displaying custom messages, and allowing user interaction by allowing up to three input fields per dialog.
While plug-ins exist that extend the functionality of FileMaker Pro custom dialogs, and the elements that may be contained in those dialogs, the Show Custom Dialog feature will meet the needs of a cross-section of simple to modest solutions.
To avoid common pitfalls and gain maximum benefit of the Show Custom Dialog feature, there are eight nuances that must be mastered. The amount of text displayed for each element of the Custom Dialog varies by OS. When designing Custom Dialogs for your system, be sure that you understand which OS your solution is geared for.
Mac OS X
1. By default, only the first 66 characters of a Dialog Title are displayed if the text is being supplied by a Text Field.
2. By default, only the first 181 characters of a Dialog Message are displayed if the text is being supplied by a Text Field.
3. By default, only the first 60 characters of a Field Label are displayed in the first two Field Labels that are used if the text is being supplied by a Text Field.
4. By default, only the first 61 characters of a Field Label are displayed in the third Field Label if the text is being supplied by a Text Field.
5. By default, only 9 characters are displayed in Button Captions.
Mac OS 9
1. By default, only the first 62 characters of a Dialog Title are displayed if the text is being supplied by a Text Field.
2. By default, only the first 241 characters of a Dialog Message are displayed if the text is being supplied by a Text Field.
3. By default, only the first 62 characters of a Field Label are displayed in the first two Field Labels that are used if the text is being supplied by a Text Field.
4. By default, only the first 63 characters of a Field Label are displayed in the third Field Label if the text is being supplied by a Text Field.
5. By default, only 11 characters are displayed in Button Captions (13 characters shows half of the first and last character).
Windows
1. By default, only the first 56 characters of a Dialog Title are displayed if the text is being supplied by a Text Field.
2. By default, only the first 267 characters of a Dialog Message are displayed if the text is being supplied by a Text Field.
3. By default, only the first 66 characters of a Field Label are displayed in the first two Field Labels that are used if the text is being supplied by a Text Field.
4. By default, only the first 69 characters of a Field Label are displayed in the third Field Label if the text is being supplied by a Text Fields.
5. By default, only 10 characters are displayed in Button Captions (11 characters shows half of the first and last character).
Adding flexibility
For maximum flexibility, design your solution to only allow for the following:
1. A maximum of a 56 character-long Dialog Title.
2. A maximum of a 181 character-long Dialog Message.
3. A maximum of a 60 character-long Field Label in the first two Field Labels.
4. A maximum of a 61 character-long Field Label in the third Field Label.
5. A maximum of a 9 character-long Button Caption.
While it may be seem easy to obtain the above object character limits, remember that these objects may now be generated dynamically by field content. Your script must trap to ensure that each object will not exceed the maximum viewing size of each element.
There are some instances where text will wrap to a new non-viewable line if the last letter of the word exceeds the maximum indicated above.
1. Up to 3 Button Captions are allowed. When designing a Custom Dialog, be smart with the choices that are given to each user. Never leave the User guessing as to which option should be chosen. Never leave a User stranded. Often a two-button choice is insufficient. For instance, use a third button to give a "Cancel" option as appropriate.
2. Button Captions are not dynamic. When designing a Custom Dialog, carefully choose appropriate button captions. While Dialog Titles, Messages, and Field Labels may be dynamically generated, Button Captions may not. Button Captions must be "hard coded" into your Custom Dialog.
Whereas Button Captions may not be dynamically set, Custom Dialogs are not necessarily reusable. Choices for a User for one situation may not be appropriate for another situation.
3. Using the Password Character option on an Input field is not dynamic. When designing a Custom Dialog, carefully choose which field input will be a password entry field. Whereas the Password Character option may not be dynamically set, Custom Dialogs are not necessarily reusable.
4. Repositioning or resizing windows generated by a Show Custom Dialog script step. If a user repositions or resizes a window that was generated by the Show Custom Dialog script step, that position and size of that Custom Dialog window is memorized until the user chooses to Reset all dialog positions and sizes in the Preference > Application > General area. A new Custom Dialog window will be displayed in the default position and size. As a Developer, you cannot always rely on setting a window position and size to enhance the User experience.
5. Custom Dialog window position and size is copy of FileMaker Pro specific, not solution or file specific. For instance, on a machine running Mac OS 9 and Mac OS X, the Custom Dialog window position and size is set independently of each other.
Also note the amount of text that can be inputted is limited to 30000 characters while the amount of text that can be shown in the input field is 31 characters.
While the Show Custom Dialog feature is a welcome addition to FileMaker Pro, it is definitely a newcomer to the arena that has some maturing to do. In its current incarnation, it is rather finicky across OS's. Additionally, it's a basic feature and lacks features that have been available from plug-in developers for many years (such as pop-up menus, size and positioning of windows, etc.). Stay tuned for a detailed review of the Custom Dialog offerings from external plug-in developers in next month's issue.
Happy FileMaking!
Clint Roberts is Editor-in-Chief of ISO FileMaker Magazine. Email him at clint@dbpublishing.com