Skip to content

Instantly share code, notes, and snippets.

@davidecassenti
Created February 26, 2014 08:05
Show Gist options
  • Save davidecassenti/9225541 to your computer and use it in GitHub Desktop.
Save davidecassenti/9225541 to your computer and use it in GitHub Desktop.
Sample on how to integrate a custom JSCA file in Titanium, in order to add custom Code Assist. The file can be placed anywhere in the project directory, and the Code Assist will be automatically recognize the new functions. More details on the file format here: http://docs.appcelerator.com/titanium/latest/#!/guide/JSCA_1.0_Specification
{
"types": [{
"name": "HelloWorld",
"examples": [],
"functions": [{
"name": "say",
"parameters": [{
"name": "message",
"usage": "optional",
"type": "String",
"description": "The name to say Hello to - by default World!"
}],
"returnTypes": [{
"type": "Boolean",
"description": "true if we said Hello to the World"
}],
"userAgents": [{
"platform": "android"
}, {
"platform": "iphone"
}, {
"platform": "ipad"
}],
"isConstructor": false,
"isClassProperty": false,
"isInternal": false,
"isMethod": true,
"isInstanceProperty": true,
"description": "Write Hello World - as simple as that"
}],
"events": [],
"userAgents": [{
"platform": "android"
}, {
"platform": "iphone"
}, {
"platform": "ipad"
}],
"deprecated": false,
"properties": []
}],
"aliases": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment