You are here: Lua Scripting Resources eGuide > Lua Scripting API Reference Guide > Event Handling > create

8.14 create

on.create()

For scripts with platform.apiLevel ‘2.0’, use on.construction() instead.

This routine is called after resize and before paint when the script application is created. The window size and graphics context are valid at this point. The on.paint event handler will be called soon after this routine finishes.

It is best to think of this function as an initialization method that fires once automatically.

Introduced in platform.apiLevel = '2.0'