Share Your Code

Generating tag list

Posted by Eric, Posted on October 10, 2010

There are occasions when you want the list of functions and symbols in Corona. This is a method to easily obtain them.

For example, there's a nifty add-on for editors called BBAutoComplete. This adds word autocompletion to many editors. It automatically looks for expansions in the program’s open documents. To use it, you need some useful expansions in a text file.

http://developer.anscamobile.com/ has a zipped file containing the HTML documentation. Unzip it into a temp folder. Open a Terminal window in this folder and run the following command:

1
sed '/Lua: An Introduction/q' api-reference.html | tail -r | sed '/Display Objects/q' | grep -v 'http:' | egrep -o '[a-zA-Z][a-zA-Z]+[.:][a-zA-Z][a-zA-Z]+[0-9]*' | sort | uniq

Save the output of this to a file. With BBAutoComplete installed to the editor of your choice, open this file. Now, you can use word autocompletion with the Corona API!

Compatibility: 
Corona 2.0

Replies

MarkHenryC
User offline. Last seen 1 year 4 weeks ago. Offline
Joined: 11 Nov 2009

Thanks. That's pretty handy.

xxleite
User offline. Last seen 2 years 39 weeks ago. Offline
Joined: 26 Jan 2011

sorry i cant find the option "-r" in "tail", im using debian linux.

does it has another option to use?

JRQ
User offline. Last seen 10 weeks 5 days ago. Offline
Joined: 28 Sep 2010

excellent! it works great. thank you.