mld has asked for the wisdom of the Perl Monks concerning the following question:

<>pI used Tk and created a UI. The UI has Entry and a command button. In the entry text box user would enter the site address.On clicking the button the function would execute and shall retrieve the details of the current web page and the Ui would get close.

when I tried to execute the following error is disleye

Tk::Error: Can't call method "readystate" on an undefined value at C:/Perl/site/lib/Win32/IEAutomation.pm line 562. Tk callback for .frame2.button Tk::__ANON__ at C:/Perl/site/lib/Tk.pm line 250 Tk::Button::butUp at C:/Perl/site/lib/Tk/Button.pm line 175 <ButtonRelease-1>

Replies are listed 'Best First'.
Re: <ButtonRelease-1> is getting displayed
by JavaFan (Canon) on Apr 01, 2009 at 10:28 UTC
    I'd say that you want to call a method "readystate" on a value that is undefined. Probably on or near line 562 of the file C:/Perl/site/lib/Win32/IEAutomation.pm.

    Without code, it's hard to say what you are doing wrong.

Re: <ButtonRelease-1> is getting displayed
by Marshall (Canon) on Apr 01, 2009 at 20:50 UTC
    Its not clear what you are trying to do. <ButtonRelease-1> would used for binding the left mouse button release to something. <1> would be when it is pressed, or I think longer form <Button-1>. To click on a normal Button, you don't have to fiddle with mouse bindings, just plug in a sub to be called. Post some code so that we can see what's going on.

    I looked in Buttom.pm. It uses these mouse bindings internally so its possible to see an error like that from the standard widget - the button up routine changes relief of the clicked button back to what it was etc.