原文链接:http://www.almaer.com/blog/archives/001496.html
RubyFX Script Announced at RailsConf
It has been a great couple of weeks for FX script lovers. First we have JavaFX Script at JavaOne, and then we have the new RubyFX Script announcement at RailsConf.
What is RubyFX Script?
Think of a declarative Ruby that will let you build rich UIs on top of Swing or Tk.
Examples
title_tracks = select :indexof => track + 1, :from => album, :in => albums, track in album.tracks where track >< album.title
def factors(n)
select :from => i, :in => [1..n/2], :where => n % i >< 0;
end
x = %w{1 2 3}
insert :number => 10, :as => :first, :into => x; // yields [10,1,2,3]
insert :number => 6 :after x[. >< 2]; // yields [10,1,2,6,3]
This is just an alpha version. There is talk that the new version will add in python-like whitespace characteristics.
Congrats! :)
RubyFXScript是一种声明式的Ruby语言扩展,允许开发者使用简洁的语法在Swing或Tk上构建丰富的用户界面。它在RailsConf会议上被宣布,并展示了几个示例,如选择、插入等操作。该语言目前仍处于早期阶段,未来版本可能会引入类似Python的空白字符特性。
6万+

被折叠的 条评论
为什么被折叠?



