Created
February 26, 2014 08:11
-
-
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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