# Getting started with Aptana and MochiKit [edit]

## Introduction

This walkthrough will instruct you how to create a new MochiKit library project and get started with your coding using the documented MochiKit library supplied by Aptana.

1. Access your projects.
   1. Click the Project tab to view your Aptana projects.
2. Create a new MochiKit project.
   1. On the New Project wizard, expandAptana Projects and select Default Web Project.
   2. Click the Next button.
   3. In the Project name: field, type a name for your new project.
   4. Click the Next button.
   5. From the Select AjAX Libraries list, check the box next to MochiKit.
   6. On the Jaxer Support screen, click the Select All button if you would like to add Jaxer support to your project.
   7. Click the Next button.
   8. On the HTML Preview Settings screen, define any custom preview settings that you might need for your project.
   9. Click the Next button.
   10. Click the Finish button.

       Aptana creates a new MochiKit project, which includes a lib folder for the MochiKit library, a new MochiKit-linked HTML template file named mochikit_sample.htm, and a new Code Assist Profile.

       The mochikit_sample.htm file automatically opens in the HTML Editor. Because mochikit_sample.htm is now the active file, your MochiKit profile now becomes the active Profile in the Code Assist Profiles View.

3. Explore the MochiKit project.
   1. Just below the open mochikit_sample.htm file in the Editor, click the Preview tab.

      Aptana displays a preview of the Rounded Corners example from MochiKit.

   2. Click the Source tab to return to the source view of mochikit_sample.htm.
   3. In the Project View, expand your project folder to view the files in your MochiKit project.
   4. In the Code Assist Profiles View, expand the mochikit_sample.htm project folder to view the documented MochiKit library files.

      These are the files that will be available to you in Code Assist.

4. Preview Code Assist.
   1. In your MochiKit project, double-click the mochikit_sample.js file to open the file in the Editor and view the code for this example.
   2. In the mochikit_sample.js file, wait a few seconds for Code Assist to load, and then hover your cursor over the swapDOM function to view the documentation for this MochiKit function.
   3. Insert your cursor somewhere on a new line in the mochikit_sample.js file, type "is".

      Code Assist displays a list of MochiKit functions that begin with the letters "is" (e.g. isDateLike, isArrayLike, etc). Use Code Assist to help you code.

5. Start coding.
   1. As you type, notice that Code Assist is now active for the MochiKit objects and functions that you use.
   2. Press ctrl+space at any time to activate Code Assist.

## Related Topics

- About MochiKit
- Getting started with Aptana and AFLAX
- Getting started with Aptana and Prototype

Retrieved from "http://aptana.com/docs/index.php/Getting_started_with_Aptana_and_MochiKit"

Categories: AptanaHelp | Walkthroughs