Skip to content

Instantly share code, notes, and snippets.

@davidecassenti
Created February 26, 2014 08:11
Show Gist options
  • Save davidecassenti/9225584 to your computer and use it in GitHub Desktop.
Save davidecassenti/9225584 to your computer and use it in GitHub Desktop.
Appcelerator | How to implement Code Assist in Titanium using ScriptDoc. Supposing you have a MyFramework object with a UI component. The UI component has some static values and a function. Comments are used in the auto-complete process while coding.
/**
* The MyFramework component
*/
var MyFramework = {};
/**
* The UI component
*/
MyFramework.UI = {
/**
* A white background for the window
*
* @type {String}
*/
WINDOW_BACKGROUND_WHITE: "white",
/**
* A black background for the window
*
* @type {String}
*/
WINDOW_BACKGROUND_BLACK: "black",
/**
* Create a customized window
*
* @param {MyFramework.UI.Window} parameters The window parameters
*
* @return {MyFramework.UI.Window} The window
*/
createWindow: function(parameters) {
var win = Ti.UI.createWindow(parameters);
// customization goes here
return win;
}
};
/**
* A Window object
*/
MyFramework.UI.Window = {
/**
* The title of the window
*
* @property {String}
*/
title: "",
/**
* The background color of the window
*
* @property {String}
*/
backgroundColor: undefined,
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment