The KPI Dashboard – Evolved
1-877-233-6149
Contact Us

Klip Developer Guide

Table of Contents

2.2. Getting Started

2.2.1. Enabling Development Tools

Before you start, enable Klipfolio Dashboard's built-in Development Tools which is disabled by default.

  1. Start Klipfolio Dashboard.

  2. Click Options on the toolbar.

  3. Select the General tab.

  4. Check Enable built-in Klip development tools.

    Figure 2.2. Development Tools Option

    Development Tools Option
  5. Now, when you open each Klip's menu, you will find a new menu option called Developer Tools with several options to help you with Klip development.

    Figure 2.3. Updated Klip Menu with Developer Tools

    Updated Klip Menu with Developer Tools

Your Klip can output text to the Debug Window using trace() commands in JavaScript (we will introduce the trace() in Chapter 6, Adding Your Own Logic to Klips).

[Note]Note

If you are using a version that does not include the option to turn on the Developer Features as described above, you can do so manually.

  1. Exit Klipfolio Dashboard.

  2. Open the Klipfolio Dashboard folder by selecting All Programs->Klipfolio->Open Klipfolio Dashboard Folder from your Windows' Start menu. Or, go to %appdata% in the Windows Explorer and go into the Klipfolio Dashboard folder.

  3. Using a text editor, open the file preferences.xml, scroll down and insert <developer>true</developer> after the <settings> tag (as shown below).

    	<settings>
    	    <developer>true</developer>
  4. Save and close preferences.xml, then restart Klipfolio Dashboard.

  5. The menu options discussed in step 5 in the above section are now available for each Klip.

2.2.2. About the Developer Tools

Here is a quick overview of the Development Tools options.

Table 2.1. Developer Tools Options

Menu ItemDescription
Show Debug WindowOpens a Debug Window for this Klip. All of the options available in the Debug Window apply only to the Klip from which it was opened. The title of the Klip is displayed in the Debug Window for easy reference even if you have several open. See Appendix A, A Tour Of The Debug Window for more details.
View SourceOpens the Klip's source in Notepad. (You can set your own text editor by changing the <viewsource> parameter in preferences.xml).
Allow Blocked Script to RunAvailable only when a Klip contains illegal script. When it is checked, Klip is reloaded, and all scripts are allowed to run.
Go to Klipfolio Dashboard Developer CenterLoads developer.klipfolio.com in the default browser.
Build a New Klip...A template Klip is added to Klipfolio Dashboard, and its source is opened in Notepad.
Clear CacheClears cache for this Klip. Does not affect cache for other Klips.
Reload Klip (Keep Customization)Clears the Klip from memory, but keeps its preferences in preferences.xml when reloading. This lets you test a Klip when you have changed the code, but want to keep the same preferences.
Reload KlipClears the Klip from memory and preferences.xml, then loads it anew.

We will be using Reload Klip in this chapter.