This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 91218 - provide posibility of user input
Summary: provide posibility of user input
Status: VERIFIED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-18 15:39 UTC by Tomas Danek
Modified: 2007-07-03 14:42 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Danek 2006-12-18 15:39:49 UTC
have a ruby file with something like:

puts "type something:"
echo = gets
puts "echo is:" + echo

This script works while running outside of ide with ruby 1.8.4  interpreter.
However, if you have this in a project in a file and run in IDE, output window
remains empty and process have to be killed.
Comment 1 Torbjorn Norbye 2006-12-19 16:53:50 UTC
Fixed in build 196. It's a bit suboptimal; the input is entered through a text
field at the bottom of the output window. This is unfortunately how input is
done in the NetBeans output window - it's identical to the way it's done for Java.

Currently, I've enabled input for project execution (ruby on main file) and file
execution (ruby on editor file). I've not done it for rdoc, rails, or rake. Do
you think it's likely that a Rakefile would require user input?
Comment 2 Martin Krauskopf 2006-12-20 08:36:15 UTC
> Do you think it's likely that a Rakefile would require user input?

When using for main purpose - in the Ant way; probably not. But could be used
for whatever, like ad hoc administration interactive scripts and is just
internal Ruby DSL, so you can use Ruby as you want. E.g. artifical:

  task :get_a_lib do |t|
    printf "Enter password: "
    password = $stdin.gets
    # connecting with #{password}...
  end

Probably would be nice to have but I would leave it until there are some actual
users wanting it.
Comment 3 Tomas Danek 2006-12-20 12:13:32 UTC
> Probably would be nice to have but I would leave it until there are some
actual users wanting it.

Agreed. My motivation for this was that a lot of people are new to ruby (like
me:-)) and they just want to try it, so they go through with some ruby
tutorials, and almost all tutorials have a chapter that uses input like this.

for now, i consider as 
verified in #196
Comment 4 Jiri Kovalsky 2007-07-03 13:58:23 UTC
Reassigning this issue to newly created 'ruby' component.
Comment 5 Jiri Kovalsky 2007-07-03 14:42:10 UTC
Changing target milestone of all resolved Ruby issues from TBD to 6.0 Beta 1 build.