in reply to Re^2: Can't get Dialog or messageBox to work from button
in thread Can't get Dialog or messageBox to work from button

I added info in the post.
  • Comment on Re^3: Can't get Dialog or messageBox to work from button

Replies are listed 'Best First'.
Re^4: Can't get Dialog or messageBox to work from button
by Corion (Patriarch) on Jan 11, 2016 at 16:27 UTC

    Why do you think that Perl couldn't find displayMsg? The debug output certainly shows that it was found and called. If Perl couldn't find a subroutine, it would have raised an error which the OP would have seen.

      Probably that in Tk methods, Tk prefer to have the address of the functions (object reference).

        But that's what sub { ... } already returns. There is no need to have a subroutine reference that itself returns another subroutine reference when called, especially when you want the function call to happen instead.