Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
select_from_cats(cats) categories = [] cats.each { |p| categories.push( '"' + p['categoryName'].gsub(/"/, '\"') + '"' ) } item = Dialog.request_item :title => "Available Categories", :prompt => "Please select a category to add", :items => categories, :button1 => "Add", :button2 => "Done" return cats[categories.index(item)] unless item.nil? end # select_cats
This paste will be private.
From the Design Piracy series on my blog: