Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Apple > Operating Systems

  • Print
  • + Share This
Like this article? We recommend

Getting into the Actual Code

So far, we haven’t talked about where the actual code resides in Dashcode. You can view all the component files of your widget by selecting Files from the View menu. It displays all the files stored within the widget package in place of the Workflow Steps.

You can also select Source Code to view the actual javascript code that is the backbone of the widget below the Canvas (see Figure 4).

Figure 4

Figure 4 View files and source code

As far as files go, the primary ones you might want to edit are the CSS, HTML, and Javascript files. The remaining files and folders are populated automatically with the various pieces of code built into Dashcode by Apple for each user interface element and action (you can view and directly edit the code for any of these items if you choose). Even the CSS and HTML files are dynamically updated whenever you make changes using the Canvas.

You can use the menus above the Source Code pane to easily switch between the files that make up a widget and to quickly locate functions that are included in the code. This can make it faster and easier to edit or fix bugs in your widget’s code. Apple also provides a library of common code elements(the Code tab of the Library pallet) that you can drag and drop to quickly the code for your widget.

  • + Share This
  • 🔖 Save To Your Account