Skip to content

Instantly share code, notes, and snippets.

@kianwilcox
kianwilcox / Dictionary.vue
Created March 8, 2016 22:19
I'm trying to create a recursively renderable configuration widget for adding key/value pairs to dictionaries, and new elements to a list. When adding these elements, it should first inspect the type of values on the keys of the already existing object, and then render a prototype based on this. This means if we have a list of dictionaries, when…
<template>
<div id="object">
<div>{</div>
<template v-for="(key, item) in dictionary">
<div>
<component
:is="kind(item)"
:object="item"
:parent="dictionary"
:index="key"
@kianwilcox
kianwilcox / gist:3628288
Created September 5, 2012 00:01
Calculator view in RubyMotion
class Calculator < UIView
attr_accessor :entryView
attr_accessor :stepView
attr_accessor :keyboardView
attr_accessor :current_problem
attr_accessor :nextInput
attr_accessor :hint
attr_accessor :reveal
attr_accessor :explain