Ruby中的wxcocadilog下拉示例
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Ruby中的wxcocadilog下拉示例相关的知识,希望对你有一定的参考价值。
This is an example of how to use the wxCocoaDialog dropdown widget from Ruby.
#!/usr/bin/env ruby -w COCOA_DIALOG = "#{ENV['TM_SUPPORT_PATH']}/bin/CocoaDialog.exe" res=%x("#{COCOA_DIALOG}" dropdown --title "Favorite OS" --text "What is your favorite operating system?" --items "Mac OS X" "OpenSolaris" "Windows" --button1 'That one!' --button2 "Cancel") button, item = res.split case button when "1": case item when "0": puts "Fanboy!" when "1": puts "ZFS Rules!" when "2": puts "Thank heaven for e and Cygwin!" end when "2": puts "Fine, be that way." else puts "Something went very, very wrong." end
以上是关于Ruby中的wxcocadilog下拉示例的主要内容,如果未能解决你的问题,请参考以下文章
示例 - Ruby on Rails 6/7 的 Select2 多个 AJAX 代码(没有 Gem)
LockSupport.java 中的 FIFO 互斥代码片段