Skip to content

Instantly share code, notes, and snippets.

@troysandal
troysandal / TCore.lua
Last active September 6, 2017 11:47
A somewhat Gideros Core.class() compatible class system. You can't mix the two system, e.g. local A = JCTCore.class() and B = JCTCore.class(A) causes strange behavior as does local MyCalss = JCTCore.class(EventDispatcher) . If you use JCTCore.class() for model objects and Core.class() for UI classes you should be ok. Write your own XYZEventDispa…
---
-- OO Classes (API compat with Gideros so we can use busted unit testing)
-- You can't mix and match, e.g. MyClass = TCore.class(EventDisatpch)
-- doesn't work. That's about the only class you'll need to implement
-- on your own for model objects.
--
-- @usage
-- local MyClass = TCore.class()
--
local TCore = {}
@troysandal
troysandal / gist:6092629
Last active December 20, 2015 07:19
Remap of Cmd-Left and Cmd-Right in Zero Brane Studio to match that of Home/End.
return {
name = "Modified Cmd-Arrow",
description = "Modified Cmd-Arrow keys to behave as Sublime Text 2",
author = "Paul Kulchenko",
onEditorKeyDown = function(self, editor, event)
local keycode = event:GetKeyCode()
local mod = event:GetModifiers()
local result