Skip to content

Instantly share code, notes, and snippets.

@jcbnlsn
jcbnlsn / TextBoxNoAutoCorrection.lua
Last active Aug 20, 2018
Turn off auto-correction on native.newTextBox
View TextBoxNoAutoCorrection.lua
-- -------------------------------------------------------------------------------
-- TextBoxNoAutoCorrection.lua - native.newTextBox extension
-- with option to turn off auto-correction
-- -------------------------------------------------------------------------------
local initialized, prevPosition, len = nil, 0, string.len
if not initialized then
local nativeNewTextBox = native.newTextBox
@jcbnlsn
jcbnlsn / main.lua
Last active Nov 17, 2015
OSX Pasteboard
View main.lua
---------------------------------------------------------------------------------
-- Example
---------------------------------------------------------------------------------
local pb = require( "pasteboard" )
pb.copy("Hello osx pasteboard")
print ( pb.paste() )
pb.clear()