[yast-commit] r40968 - in /trunk/ruby-bindings/examples/ruby: logger.rb test1.rb ui.rb ycp_from_ruby.rb
Author: dmacvicar Date: Wed Sep 19 17:50:49 2007 New Revision: 40968 URL: http://svn.opensuse.org/viewcvs/yast?rev=40968&view=rev Log: reorganize examples Added: trunk/ruby-bindings/examples/ruby/logger.rb trunk/ruby-bindings/examples/ruby/ui.rb Removed: trunk/ruby-bindings/examples/ruby/test1.rb trunk/ruby-bindings/examples/ruby/ycp_from_ruby.rb Added: trunk/ruby-bindings/examples/ruby/logger.rb URL: http://svn.opensuse.org/viewcvs/yast/trunk/ruby-bindings/examples/ruby/logger.rb?rev=40968&view=auto ============================================================================== --- trunk/ruby-bindings/examples/ruby/logger.rb (added) +++ trunk/ruby-bindings/examples/ruby/logger.rb Wed Sep 19 17:50:49 2007 @@ -0,0 +1,5 @@ +require 'yast' +include YaST +#ui = YaST::Module.new("UI") + +y2milestone("Hello") \ No newline at end of file Added: trunk/ruby-bindings/examples/ruby/ui.rb URL: http://svn.opensuse.org/viewcvs/yast/trunk/ruby-bindings/examples/ruby/ui.rb?rev=40968&view=auto ============================================================================== --- trunk/ruby-bindings/examples/ruby/ui.rb (added) +++ trunk/ruby-bindings/examples/ruby/ui.rb Wed Sep 19 17:50:49 2007 @@ -0,0 +1,22 @@ +require 'yast' +ui = YaST::Module.new("UI") + +include YaST::Ui + +t = HBox( Label("Welcome to Ruby!"), PushButton("Push me") ) + +puts "#{t.to_s} #{t.class}" + +ui.OpenDialog(t) +ui.UserInput() + +# You can also use downcase, as the symbols are aliased +t = hbox( label("Welcome to Ruby!"), pushbutton("Push me") ) + +puts "#{t.to_s} #{t.class}" + +ui.OpenDialog(t) +ui.UserInput() + + +exit \ No newline at end of file -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
dmacvicar@svn.opensuse.org