On Sep 26, 12:20 pm, Li Chen <chen_... / yahoo.com> wrote:
> Li Chen wrote:
> > Hi Chris,
>
> > Here is the script:
> > ###
> > require 'fox16'
> > include Fox
>
> > result = FXInputDialog.getString("Enter some text...",self,"New
> > InputDialog","Please type some text:")
> > if result
> >   print "User entered: " + result
> > end
> > ###
>
> > Here is the result of running the script:
>
> > C:\ruby\self\fox>fox1.rb
> > C:/ruby/self/fox/fox1.rb:4:in `getString': No matching function for
> > overloaded 'FXInputDialog_getString' (ArgumentError)
> >         from C:/ruby/self/fox/fox1.rb:4
>
> > I am sure what is wrong?
>
> > Li
>
> Sorry there is a typo in my earlier post: I am NOT sure what is wrong
> about the results when I followed Chris's code sample.
>
> Thanks,
>
> Li
> --
> Posted viahttp://www.ruby-forum.com/.

Sorry about that, I was on a computer without Ruby so it only worked
in Theory ;)

Here is a full working example:
require 'rubygems'
require 'fox16'
include Fox

if __FILE__ == $0
  FXApp.new do |app|
    app.create
    result = FXInputDialog.getString("Enter some text...",app,"New
InputDialog","Please type some text:")
    if result
      puts "User entered: " + result
    else
      puts "User cancled!"
    end
  end
end

The dialog requires an app (or a parent window), my initial example
didn't account for that

Any clearer?