Introduction
This walkthrough will instruct you how to create a new Prototype project and get started with your coding using the documented Prototype library supplied by Aptana.
- Access your projects.
- Click the Project tab to view your Aptana projects.
- Create a new Prototype project.
- From the Aptana File menu, select New > Project...
The New Project wizard opens.
- On the New Project wizard, expandAptana Projects and select Default Web Project.
- Click the Next button.
- In the Project name: field, type a name for your new project.
- Click the Next button.
- From the Select AjAX Libraries list, check the box next to Prototype.
- On the Jaxer Support screen, click the Select All button if you would like to add Jaxer support to your project.
- Click the Next button.
- On the HTML Preview Settings screen, define any custom preview settings that you might need for your project.
- Click the Next button.
- Click the Finish button.
Aptana creates a new Prototype project, which includes a lib folder for the Prototype library, a new Prototype-linked HTML template file named prototype_sample.htm, and a new Code Assist Profile.
The prototype_sample.htm file automatically opens in the HTML Editor. Because prototype_sample.htm is now the active file, your Prototype profile now becomes the active Profile in the Code Assist Profiles View.
- From the Aptana File menu, select New > Project...
- Explore the Prototype project.
- Just below the open prototype_sample.htm file in the Editor, click the Preview tab.
Aptana displays a preview of the Local Links example from Prototype.
- Click the Source tab to return to the source view of prototype_sample.htm.
- In the Project View, expand your project folder to view the files in your Prototype project.
- In the Code Assist Profiles View, expand the prototype_sample.htm project folder to view the documented Prototype library files.
These are the files that will be available to you in Code Assist.
- Just below the open prototype_sample.htm file in the Editor, click the Preview tab.
- Preview Code Assist.
- In your prototype_sample.htm file, hover your cursor over the $ in the line "paragraph = $(paragraph);" to view the documentation for the Prototype "$" function.
- Insert your cursor just after "paragraph = $(paragraph);", and press Return to create a new line.
- Type "in" and press ctrl+space.
Code Assist displays a list of Prototype functions that begin with the letters "in" (e.g. include, indexOf, etc). Use Code Assist to help you code.
- Start coding.
- As you type, notice that Code Assist is now active for the Prototype objects and functions that you use.
- Press ctrl+space at any time to activate Code Assist.