Best Practices
This section discusses recommended best practices that the guide hopes developers will follow to help all users and developers involved.
Honor the User's Preferences to Connect Online: This part was discussed under Connect on Preferences section of the Flickr Search Panel tutorial. It is important to honor the user's preferences if the user does not want to connect to the internet.
Resign Focus (Keyboard Events): It is important to resign focus to Adobe Photoshop whenever the user presses the ESC key and whenever the user presses the ENTER or RETURN key to execute an event or a text input control component. A spacebar should never press a button.
Resource Management: Since every Photoshop Panel requires a significant amount of memory, it is wise to test memory usage and eliminating unnecessary lines of code or components. The property Application.freeMemory in JavaScript returns the amount of unused memory available to Adobe Photoshop.
Resign Focus (Keyboard Events): It is important to resign focus to Adobe Photoshop whenever the user presses the ESC key and whenever the user presses the ENTER or RETURN key to execute an event or a text input control component. A spacebar should never press a button.
Resign Focus (Mouse Events): It is important to resign focus to Adobe Photoshop whenever the user clicks on any part of the panel other than the control components that retains focus (i.e. text input, combo box). This includes but are not limited to buttons, sliders, radio buttons, and the panel's background.
Focus Feedback: The user should be given specific visual feedback such as where the type in will be processed or which item in a combo box is selected. This includes but are not limited to a flashing bar "|" in a text input field, a selected text block in a text input field, or an active combo box.
Behavior of a Tab Key: If there are multiple text input or combo box control component, the tab key should cycle through each of them. However, if there exists only one text-input or combo box control component, the current entered value should only be selected. For example, the current value in a text input should be highlighted if cycled through the tab keys. Note: The user should not be able to able to cycle through other components such as buttons preventing the spacebar from executing or pressing a component.