Skip to content

Instantly share code, notes, and snippets.

@airportyh
Created August 31, 2009 20:42
Show Gist options
  • Save airportyh/178698 to your computer and use it in GitHub Desktop.
Save airportyh/178698 to your computer and use it in GitHub Desktop.
Data.bind{text_box.text = "#{user.name} (#{user.email})"}
# or
text_box.bind(:text){"#{user.name} (#{user.email})"}
# this would use parseTree
# http://www.igvita.com/2008/12/11/ruby-ast-for-fun-and-profit/
# to get the AST for the block
# and figure out that it needs to invoke the block when
# user.name or user.email has changed, and so registers a property
# change event. You will probably need to build a property change
# event system. Maybe like
user.when_property_changed('name'){ ... }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment