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

An idea I've been toying with is to include a popup window with hints and tricks before the user can use the program. On the window, there is a close button, and a checkbox to indicate that it won't open again on startup.

The problem comes from storing data between times the program is used, and the only way I can think of is to use a file. Store it in the user's home dir; if it's absent, pop up the help window; if it's there, don't. Or use a config file with an entry in there for the help window. That might be better.

But that's my idea. Anyone else have a good idea?

Replies are listed 'Best First'.
Re: Tk Popup tutorial window only once?
by Anonymous Monk on Oct 31, 2013 at 21:31 UTC

    A config file allows you to save other options and preferences, and provides an obvious way for someone to re-enable the hints if they want them back after clicking to turn them off.

Re: Tk Popup tutorial window only once?
by Anonymous Monk on Nov 01, 2013 at 02:13 UTC

      Thanks for the TOTD tip. I just tried it, and it seemed to work, but I have a slight problem. The program doesn't seem to return control to the shell that called it once the program exits. The effect is reproducible in the following code:

      #!/usr/bin/env perl use strict; use warnings; use utf8; use Tk; use Tk::TOTD; my $mw = MainWindow->new; my $label = $mw->Label( -text => 'hi!')->pack; my $entry = $mw->Entry()->pack; my $button = $mw->Button( -text => 'push me!')->pack; my @messages = ( 'message 1', 'message 2', 'message 3'); my $totd = $mw->TOTD ( -title => 'Tip Of The Day', -messages => \@messages); $totd->Show; MainLoop;

      If necessary, i can open this in a new node.