in reply to Perl Tk Multiple Notebook Editing and Save

Can anyone give me idea how to get around this issue

Start a new file and write you program so that it is taking full advantage of the free help of strict and warnings by Coping with Scoping

You have too many global variables which you overwrite at various points.... subroutines should take arguments, not work with global variables, you need more such subroutines

Simply switching to my vars in your subroutines will solve your "textbox variable remember only latest open file"

Re^9: TK Gui Help / Re^3: TK Gui Help

Tk tips :)

perl Tk help, RFC: Learning Perl/Tk, Perl/Tk: For Beginners, Re^3: Tkx Search for dialog box for text input , Re: TclTk interface with Perl code, is it possible? , Re^2: GUI toolkit+designer for the perl newbie , Re: Easier GUI, Re: Should I use Perl/TK?, Re^2: need a popup gui stdin, Tk Tree Tutorial ( http://www.rtapo.com/tutorials/tk_tree.html ), some Tkx tutorial links, Tutorial http://theoryx5.uwinnipeg.ca/perltk/ and http://www.perl.com/pub/1999/10/perltk/, http://perltk.org/, http://web.archive.org/web/20100310202528/http://theoryx5.uwinnipeg.ca/perltk/, How to RTFM Tk Tutorials

  • Comment on Re: Perl Tk Multiple Notebook Editing and Save

Replies are listed 'Best First'.
Re^2: Perl Tk Multiple Notebook Editing and Save
by akamboj84 (Novice) on Oct 07, 2014 at 05:11 UTC

    Thanks for pointing them out. I have fixed those errors as you suggested. However in the actual code, which variable are you suggesting to switch to my vars. whenever a tab is raised i want to edit that file and save it. i tried but cant figure out where is the mistake or what am i missing. any help would be appreciated.

      Thanks for pointing them out. I have fixed those errors as you suggested. However ...

      How did you fix them?

      Here is how I fixed them

      I run the program, open two three files, and two three new tabs are added, I hit save on each tab and the correct filename is selected/warned, not just the latest ...

      i tried but cant figure out where is the mistake or what am i missing.

      What I said, subs shouldn't use global variables, they should pass arguments, its Coping with Scoping also known as the spirit of strict also known as the life cycle of variables or memory management