AutoComplete List - All functions and Reserved Words

I spent a couple minutes putting all of the Corona functions & Lua reserved words in a list for the auto complete feature in CPM just copy and paste

and
break
do
else
elseif
end
false
for
function
if
in
local
nil
not
or
repeat
return
then
true
until
while
display.newCircle ( )
display.newImage ( )
display.newLine ( )
display.newRect ( )
display.newRoundedRect ( )
display.newText ( )
display.newGroup ( )
object.alpha
object.height
object.isVisible
object.isHitTestable
object.length
object.parent
object.rotation
object.stageBounds
object.stageHeight
object.stageWidth
object.width
object.x
object.xOrigin
object.xReference
object.xScale
object.y
object.yOrigin
object.yReference
object.yScale
object:dispatchEvent ( )
object:getParent ( )
object:rotate ( )
object:scale ( )
object:setReferencePoint ( )
object:translate ( )
object.strokeWidth
object:setFillColor ( )
object:setStrokeColor ( )
object.text
object.size
object:setTextColor ( )
group.numChildren
group:insert ( )
group:remove ( )
stage:setFocus ( )
display.captureScreen ( )
display.save ( )
display.setStatusBar ( )
display.contentWidth
display.contentHeight
display.statusBarHeight
object:addEventListener ( )
object:removeEventListener ( )
event.name
event.xGravity
event.yGravity
event.zGravity
event.xInstant
event.yInstant
event.zInstant
event.isShake
event.sprite
event.phase
event.phase
event.object1
event.object2
event.other
event.force
event.friction
event.name
enterFrame
event.name
event.time
event.name
event.geographic
event.magnetic
event.name
event.latitude
event.longitude
event.altitude
event.accuracy
event.speed
event.direction
event.time
event.errorMessage
event.errorCode
event.name
event.type
event.delta
system
event.name
event.type
timer
event.name
event.source
event.count
event.time
event.x
event.y
event.xStart
event.yStart
event.phase
event.id
event.time
event.name
event.url
event.errorMessage
event.errorCode
transition.to ( )
transition.from ( )
easing.linear ( )
easing.inQuad ( )
easing.outQuad ( )
easing.inOutQuad ( )
easing.inExpo ( )
easing.outExpo ( )
easing.inOutExpo ( )
movieclip.newAnim ( )
object:play ( )
object:play ( )
object:reverse ( )
object:reverse ( )
object:nextFrame ( )
object:previousFrame ( )
object:stop ( )
object:stopAtFrame ( )
object:setLabels ( )
object:setDrag ( )
media.newEventSound ( )
media.playEventSound ( )
media.playSound ( )
media.pauseSound ( )
media.stopSound ( )
media.playVideo ( )
media.show ( )
native.setActivityIndicator ( )
native.showAlert ( )
native.cancelAlert ( )
native.newFont ( )
native.getFontNames ( )
native.setKeyboardFocus ( )
native.newTextField ( )
object.align
object.font
object.isSecure
object.size
object.text
object:setTextColor ( )
native.newTextBox ( )
object.align
object.font
object.hasBackground
object.size
object.text
object:setTextColor ( )
native.showWebPopup ( )
native.cancelWebPopup ( )
object.baseUrl
object.hasBackground
object.urlRequest
physics.addBody ( )
body.isAwake
body.isBodyActive
body.isBullet
body.isSleepingAllowed
body.isFixedRotation
body.angularVelocity
body.linearDamping
body.angularDamping
body.bodyType
body:setLinearVelocity ( )
body:getLinearVelocity ( )
body:applyForce ( )
body:applyTorque ( )
body:applyLinearImpulse ( )
body:applyAngularImpulse ( )
body:resetMassData ( )
physics.newJoint ( )
joint:getAnchorA ( )
joint:getAnchorB ( )
joint:getReactionForce ( )
joint:removeSelf ( )
joint.isMotorEnabled
joint.motorSpeed
joint.motorTorque
joint.maxMotorTorque
joint.isLimitEnabled
joint:setRotationLimits ( )
joint:getRotationLimits ( )
joint.jointAngle
joint.jointSpeed
joint.length
joint.frequency
joint.dampingRatio
joint.isMotorEnabled
joint.motorSpeed
joint.motorForce
joint.maxMotorForce
joint.isLimitEnabled
joint:setLimits ( )
joint:getLimits ( )
joint.jointTranslation
joint.jointSpeed
joint.maxForce
joint.maxTorque
joint.isMotorEnabled
joint.motorSpeed
joint.motorForce
joint.maxMotorForce
joint.isLimitEnabled
joint:setLimits ( )
joint:getLimits ( )
joint.jointTranslation
joint.jointSpeed
joint.length1
joint.length2
joint.ratio
sprite.newSpriteSheet ( )
sprite.newSpriteSet ( )
sprite.add ( )
spriteInstance.newSprite ( )
spriteInstance:prepare ( )
spriteInstance:play ( )
spriteInstance:pause ( )
spriteInstance:addListener ( )
spriteSheet:dispose ( )
spriteInstance.animating
spriteInstance.currentFrame
spriteInstance.sequence
spriteInstance.sequences
openfeint.init ( )
openfeint.launchDashboard ( )
openfeint.unlockAchievement ( )
openfeint.setHighScore ( )
openfeint.uploadBlob ( )
openfeint.downloadBlob ( )
assert( )
error ( )
_G
getfenv ( )
getmetatable ( )
ipairs ( )
next ( )
pairs ( )
pcall ( )
print ( )
rawequal ( )
rawget ( )
rawset ( )
select ( )
setfenv ( )
setmetatable ( )
tonumber ( )
tostring ( )
type ( )
unpack ( )
table.concat ( )
table.insert ( )
table.maxn ( )
table.remove ( )
table.sort ( )
crypto.digest ( )
crypto.hmac ( )
crypto.md4
crypto.md5
crypto.sha1
crypto.sha224
crypto.sha256
crypto.sha384
crypto.sha512
luasqlite
io.close ( )
io.flush ( )
io.input ( )
io.lines ( )
io.open ( )
io.output ( )
io.popen ( )
io.read ( )
io.tmpfile ( )
io.type ( )
io.write ( )
file:close ( )
file:flush ( )
file:lines ( )
file:read ( )
file:seek ( )
file:setvbuf ( )
file:write ( )
math.abs ( )
math.acos ( )
math.asin ( )
math.atan ( )
math.atan2 ( )
math.ceil ( )
math.cos ( )
math.cosh ( )
math.deg ( )
math.exp ( )
math.floor ( )
math.fmod ( )
math.frexp ( )
math.huge
math.ldexp ( )
math.log ( )
math.log10 ( )
math.max ( )
math.min ( )
math.modf ( )
math.pi
math.pow ( )
math.rad ( )
math.random ( )
math.randomseed ( )
math.sin ( )
math.sinh ( )
math.sqrt ( )
math.tan ( )
math.tanh ( )
module ( )
require ( )
package.loaded
package.loaders
package.seeall ( )
luasocket
os.clock ( )
os.date ( )
os.difftime ( )
os.exit ( )
os.remove ( )
os.rename ( )
os.time ( )
string.byte ( )
string.char ( )
string.find ( )
string.format ( )
string.gmatch( )
string.gsub ( )
string.len ( )
string.lower ( )
string.match ( )
string.rep ( )
string.reverse ( )
string.sub ( )
string.upper ( )
system.getPreference ( )
system.getTimer ( )
system.openURL ( )
system.pathForFile ( )
system.setAccelerometerInterval ( )
system.setIdleTimer ( )
system.setLocationAccuracy ( )
system.setLocationThreshold ( )
system.vibrate ( ) [import]uid: 7664 topic_id: 6129 reply_id: 306129[/import]

Nice!

The autocomplete list is supposed to be filled in automatically but I’ve heard from some people that it failed for them, so this list should come in handy for them.

Thank you!

Jay
[import]uid: 9440 topic_id: 6129 reply_id: 21000[/import]

Okay, here’s what I’m working on – a new list of autocomplete words that INCLUDE the parameters. That way instead of getting…

local abc = display.newRect()

…you will get…

local abc = display.newRect(top, left, width, height)

The needed parameters are listed and you just “fill in the blanks” with whatever you want.

This means quick trips to the API Reference could be a thing of the past for when you just need a reminder of which parameters are used, in what order, etc.

Here’s a quick 2 and half minute video that shows what I’m talking about:

http://instantvideowebpages.com/play/notmplvid.php?573

Hopefully I’ll have the list done in a couple days.

Jay
[import]uid: 9440 topic_id: 6129 reply_id: 24146[/import]

Just watched the video, this will be simply perfect…

I think with this feature, I can finally stop using Textmate :slight_smile:

ps. I have auto upgraded to 2.1.1 and autocomplete list is NOT filled in. I had few entries in there, could that be the problem? [import]uid: 10478 topic_id: 6129 reply_id: 24247[/import]

My auto complete list is ok after upgrading to 2.1.1. I’m on a mac. Are you PC or Mac? [import]uid: 33866 topic_id: 6129 reply_id: 24260[/import]

If you’re using the Windows version, there was a problem with the first version that has autocomplete – the DB didn’t get filled in like it should have. And it only tries to fill it in the first time, so as not to wipe out new things you’ve put in, etc.

You can paste in the list above or just wait a few more days until the new list is available.

Jay
[import]uid: 9440 topic_id: 6129 reply_id: 24261[/import]

I’m on Mac (OSX 10.6.6 to be exact)

It’s not a big deal, I’ve already copied the above list.
Just wanted to let u know… [import]uid: 10478 topic_id: 6129 reply_id: 24267[/import]

New list that includes parameters for most of the Corona stuff. When used in the editor you end up with something like this:

…then you just “fill in the blanks” – makes it easier to remember what all the parameters are.

Just copy the list below, open CPM Prefs > Editor, delete all the current autocomplete words (select all, delete) and then paste in the new list. As of v2.2 of CPM you don’t have to restart CPM for the changes to take affect – earlier versions will need to do that.

Jay

analytics.init ( )
analytics.logEvent ( )
and
assert( )
audio.dispose ( )
audio.fade ( [{ [channel=] [, time=] [, volume=] } ] )
audio.fadeOut ( [{ [channel=] [, time=] } ] )
audio.findFreeChannel ( )
audio.freeChannels
audio.getDuration ( )
audio.getMaxVolume ( { channel= } )
audio.getMinVolume ( { channel= } )
audio.getVolume ( [{ channel= }] )
audio.isChannelActive ( )
audio.isChannelPaused ( )
audio.isChannelPlaying ( )
audio.loadSound ( )
audio.loadStream ( )
audio.pause ( )
audio.play ( [, { [channel=] [, loops=] [, duration=] [, fadein=] [, onComplete=] } ] )
audio.reserveChannels ( )
audio.reservedChannels
audio.resume ( )
audio.rewind ( [] [, { channel= }] )
audio.seek ( [, { channel= }] )
audio.setMaxVolume ( , { channel= } )
audio.setMinVolume ( , { channel= } )
audio.setVolume ( [,{ channel= }] )
audio.stop ( )
audio.stopWithDelay ( )
audio.totalChannels
audio.unreservedFreeChannels
audio.unreservedUsedChannels
audio.usedChannels
body.angularDamping
body.angularVelocity
body.bodyType
body.isAwake
body.isBodyActive
body.isBullet
body.isFixedRotation
body.isSleepingAllowed
body.linearDamping
body:applyAngularImpulse ( )
body:applyForce ( , , , )
body:applyLinearImpulse ( , , , )
body:applyTorque ( )
body:getLinearVelocity ( )
body:resetMassData ( )
body:setLinearVelocity ( , )
break
crypto.digest ( , )
crypto.hmac ( , , )
crypto.md4
crypto.md5
crypto.sha1
crypto.sha224
crypto.sha256
crypto.sha384
crypto.sha512
display.captureScreen ( )
display.contentCenterX
display.contentCenterY
display.contentHeight
display.contentScaleX
display.contentScaleY
display.contentWidth
display.getCurrentStage ( )
display.loadRemoteImage ( , , , )
display.newCircle( , , )
display.newGroup ( )
display.newImage( )
display.newImage( )
display.newImageRect ( , )
display.newLine( , , , )
display.newRect( , , , )
display.newRoundedRect( , , , , )
display.newText( , , , , )
display.save ( , )
display.screenOriginX
display.screenOriginY
display.setDefault( , , , )
display.setStatusBar ( )
display.statusBarHeight
display.viewableContentHeight
display.viewableContentWidth
do
easing.inExpo ( , , , )
easing.inOutExpo ( , , , )
easing.inOutQuad ( , , , )
easing.inQuad ( , , , )
easing.linear ( , , , )
easing.outExpo ( , , , )
easing.outQuad ( , , , )
else
elseif
end
error ( )
event.accuracy
event.altitude
event.city
event.cityDetail
event.count
event.country
event.countryCode
event.delta
event.direction
event.errorCode
event.errorMessage
event.force
event.friction
event.geographic
event.id
event.invalidProducts
event.isError
event.isShake
event.latitude
event.longitude
event.magnetic
event.name
event.object1
event.object2
event.other
event.phase
event.postalCode
event.products
event.region
event.regionDetail
event.source
event.speed
event.sprite
event.street
event.streetDetail
event.time
event.transaction
event.type
event.url
event.x
event.xGravity
event.xInstant
event.xStart
event.y
event.yGravity
event.yInstant
event.yStart
event.zGravity
event.zInstant
facebook.login ( , )
facebook.logout ( )
facebook.request ( )
facebook.showDialog ( )
false
file:close ( )
file:flush ( )
file:lines ( )
file:read ( )
file:seek ( )
file:setvbuf ( )
file:write ( )
for
function
getfenv ( )
getmetatable ( )
group.numChildren
group:insert( , )
group:remove ( )
if
in
io.close ( )
io.flush ( )
io.input ( )
io.lines ( )
io.open ( )
io.output ( )
io.popen ( )
io.read ( )
io.tmpfile ( )
io.type ( )
io.write ( )
ipairs ( )
joint.dampingRatio
joint.frequency
joint.isLimitEnabled
joint.isMotorEnabled
joint.jointAngle
joint.jointSpeed
joint.jointTranslation
joint.length
joint.length1
joint.length2
joint.maxForce
joint.maxMotorForce
joint.maxMotorTorque
joint.maxTorque
joint.motorForce
joint.motorSpeed
joint.motorTorque
joint.ratio
joint:getAnchorA ( )
joint:getAnchorB ( )
joint:getLimits ( )
joint:getReactionForce ( )
joint:getRotationLimits ( )
joint:removeSelf ( )
joint:setLimits ( , )
joint:setRotationLimits ( , )
local
math.abs ( )
math.acos ( )
math.asin ( )
math.atan ( )
math.atan2 ( , )
math.ceil ( )
math.cos ( )
math.cosh ( )
math.deg ( )
math.exp ( )
math.floor ( )
math.fmod ( , )
math.frexp ( )
math.huge
math.ldexp ( , )
math.log ( )
math.log10 ( )
math.max ( , )
math.min ( , )
math.modf ( )
math.pi
math.pow ( , )
math.rad ( )
math.random ( )
math.randomseed ( )
math.sin ( )
math.sinh ( )
math.sqrt ( )
math.tan ( )
math.tanh ( )
media.getSoundVolume ( )
media.newEventSound ( )
media.newRecording( )
media.pauseSound ( )
media.playEventSound ( )
media.playSound( )
media.playSound( )
media.playVideo( , , )
media.setSoundVolume( )
media.show ( , )
media.stopSound ( )
module ( )
movieclip.newAnim ( )
myMap.isLocationVisible =
myMap.isScrollEnabled =
myMap.isZoomEnabled =
myMap.mapType =
myMap:addMarker ( , , [{ title="", subtitle="" }] )
myMap:getAddressLocation ( )
myMap:getUserLocation ( )
myMap:removeAllMarkers ( )
myMap:setCenter ( , , )
myMap:setRegion ( , , , , )
native.cancelAlert ( )
native.cancelWebPopup ( )
native.getFontNames ( )
native.newFont ( )
native.newTextBox ( , , , )
native.newTextField ( , , , )
native.setActivityIndicator ( )
native.setKeyboardFocus ( )
native.showAlert ( , )
native.showWebPopup( )
native.showWebPopup( , , , , )
network.download ( , , , )
network.request ( , , )
next ( )
nil
not
align
alpha
baseUrl
font
hasBackground
height
isHitTestable
isSecure
isVisible
length
parent
play ( )
rotation
size
stageBounds
stageHeight
stageWidth
strokeWidth
text
urlRequest
width
x
xOrigin
xReference
xScale
y
yOrigin
yReference
yScale
addEventListener ( , )
dispatchEvent( )
getSampleRate ( )
getTunerFrequency ( )
getTunerVolume ( )
isRecording ( )
nextFrame ( )
play ( )
play { startFrame=, endFrame=, loop=, remove= }
previousFrame ( )
removeEventListener ( , )
reverse ( )
reverse { startFrame=, endFrame=, loop=, remove= }
rotate( )
scale ( , )
setDrag ( drag= )
setFillColor ( , , )
setLabels { frameLabel1=, frameLabel2=, frameLabelN= }
setReferencePoint ( )
setSampleRate( )
setStrokeColor ( , , )
setTextColor ( , , )
startRecording ( )
startTuner ( )
stop ( )
stopAtFrame ( )
stopRecording ( )
stopTuner ( )
translate ( , )
openfeint.downloadBlob ( , )
openfeint.init ( , , , )
openfeint.launchDashboard ( )
openfeint.launchDashboard ( , )
openfeint.setHighScore ( { leaderboardID=, score= } )
openfeint.unlockAchievement ( )
openfeint.uploadBlob ( , )
or
os.clock ( )
os.date ( )
os.difftime ( , )
os.execute( )
os.exit ( )
os.remove ( )
os.rename ( , )
os.time ( )
package.loaded
package.loaders
package.seeall ( )
pairs ( )
pcall ( , , )
physics.addBody ( , {density=, friction=, bounce= [,radius=]} )
physics.addBody ( , {density=, friction=, bounce= [,shape=]} )
physics.newJoint ( , , , , )
print ( )
rawequal ( , )
rawget ( , )
rawset ( , , )
repeat
require ( )
return
select ( , )
setfenv ( , )
setmetatable ( , )
sprite.add ( , , , , , )
sprite.newSpriteSet ( , , )
sprite.newSpriteSheet ( , , )
sprite.newSpriteSheetFromData( , )
spriteInstance.animating
spriteInstance.currentFrame
spriteInstance.newSprite ( )
spriteInstance.sequence
spriteInstance.sequences
spriteInstance:addListener ( )
spriteInstance:pause ( )
spriteInstance:play ( )
spriteInstance:prepare ( )
spriteSheet:dispose ( )
stage:setFocus ( )
store.canMakePurchases
store.finishTransaction ( )
store.init ( )
store.loadProducts ( , )
store.purchase ( )
store.restore()
string.byte ( )
string.char ( )
string.find ( , )
string.format ( )
string.gmatch( , )
string.gsub ( , , )
string.len ( )
string.lower ( )
string.match ( , )
string.rep ( , )
string.reverse ( )
string.sub ( , )
string.upper ( )
system.getInfo( )
system.getPreference ( , )
system.getTimer ( )
system.openURL ( )
system.pathForFile ( )
system.setAccelerometerInterval ( )
system.setIdleTimer ( )
system.setLocationAccuracy ( )
system.setLocationThreshold ( )
system.vibrate ( )
table.concat ( )
table.insert ( , )
table.maxn ( )
table.remove ( )
table.sort ( )
then
timer.cancel ( )
timer.performWithDelay ( , )
tonumber ( )
tostring ( )
transition.cancel ( )
transition.dissolve( , , , )
transition.from ( , )
transition.to ( , )
true
type ( )
unpack ( )
until
while
_G
[import]uid: 9440 topic_id: 6129 reply_id: 24786[/import]

This is great!!! Thanks for making this happen. [import]uid: 11904 topic_id: 6129 reply_id: 24925[/import]

Simply confirming that auto-complete on Windows Version 2.2.1 (5) is empty after installation under preferences. Thanks! [import]uid: 40932 topic_id: 6129 reply_id: 28201[/import]

Currently when auto-complete adds a structure, it moves the cursor to the end of the line. At this point I am forced to bring it back or use the mouse (not a fan of the mouse for coding).

Next, I was expecting I could tab through the parameters which I could not do. My flow should be something like this,
[lua]display.newImageRe[/lua]
press tab which shows code below and first field parentGroup selected
[lua]display.newImageRect ( , )[/lua]
press delete, tab which selects the filename field
[lua]display.newImageRect ( , )[/lua]
type “background.png” then press tab, delete, tab and type 100, press tab type 100
[lua]display.newImageRect ( “background.png”, 100, 100 )[/lua]
This seems the natural way to do things but I’m open to other suggestions if I’m missing the obvious. Thanks! [import]uid: 40932 topic_id: 6129 reply_id: 28202[/import]

Yes please.

I hate having to stop typing to grab the mouse, pops me right out of my code bubble. [import]uid: 5317 topic_id: 6129 reply_id: 28205[/import]

Highlighting the first placeholder after inserting the parameters should be doable in the next version.

Hitting Tab does make sense to hop from one to the other – right now Command-/ (or Control-/ on Windows) will jump to the next placeholder and highlight it. I’d like to remap that to Tab myself, so I’ll see what I can do.

If I sound a little wishy-washy on that, it’s only because I didn’t write the core of the code editor, so changing things isn’t as easy as in the rest of the program. :slight_smile:

Thanks.

Jay
[import]uid: 9440 topic_id: 6129 reply_id: 28206[/import]

Good luck with the re-map!

I hope things go well, although command-/ isn’t the end of the world.

Don’t know if this is going to be easy enough for you to debug, but I have noticed when going through the presets, and deleting ones I don’t need, or just filling them out, sometimes, commas are deleted, or not kept. I don’t have any specifics at the moment, but when I notice it happening, I will make note for you. [import]uid: 5317 topic_id: 6129 reply_id: 28208[/import]

Good news and bad news…

Good news is that now when you do autocomplete and there are placeholders, the first placeholder in the line is highlighted. Plus, Tab now flips you to the next placeholder on the line.

The bad news is that you can’t have that version, yet. :slight_smile:

I don’t have a release date set for the next version yet, but now you can at least look forward to that feature working the way we all want.

Jay
[import]uid: 9440 topic_id: 6129 reply_id: 28217[/import]

Hey, Jay!

I’m adding autocomplete for Corona to Coda, so I wondered if it’s okay if I borrow your list? It seems to be the most complete list, and you’ve already got the parameters defined. [import]uid: 13180 topic_id: 6129 reply_id: 28662[/import]

Yep, go for it!

Jay
[import]uid: 9440 topic_id: 6129 reply_id: 28683[/import]

@Nerderer how can i contact You? Please write me an email to piotr [at] blerdo.com [import]uid: 22837 topic_id: 6129 reply_id: 28724[/import]

I was wondering which editor(s) work with auto-complete and how do you activate the interface? I am currently using Textmate. Thanks! [import]uid: 6288 topic_id: 6129 reply_id: 35916[/import]