Last active
February 23, 2016 20:00
-
-
Save fkchang/8303383 to your computer and use it in GitHub Desktop.
An off the top of my head idea for a high level opal framework to write web apps in. The idea is that at the level of application development, you want to stick at the level, i.e. what you see, and what it does. They way it is now, is you have to constantly do deep rabbit hole dives into markup, css, front end vs backend languages etc. The simpl…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'opal-tk' | |
app = App.new | |
app.main { |main| | |
main.vbox { |vbox|# vertical box container, auto lays out things vertically | |
vbox.hbox { |hbox| | |
hbox.header("Welcome to Opal-Tk").pack # pack means tell my parent to manage me | |
hbox.separator.pack | |
} | |
vbox.group_box {|group_box| | |
group_box.button("popup").bind("click") { | |
group_box.dialog_box("Surprise", "Ok").popup | |
} | |
group_box.button("quit").bind("click") { | |
group_box.dialg_box("Sorry to see you go", "Bye").popup | |
} | |
} | |
} | |
app.run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment