The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Puppet::VcsTools::LogEdit - Tk composite widget to edit a Vcs Log

SYNOPSIS

 my $eh = $widget->LogEditor( name => 'dummy', 
                            revision=> '1.1', 
                            'format' => $logDataFormat) ;

 $eh->Show(info => Storage_object_of_a_VcsTools_Version_object) ;

DESCRIPTION

This composite Tk Widget is used to edit the log information of a version of a Vcs file. A version of a Vcs file is implemented in the VcsTools::Version object. And the log information is stored in its associated Puppet::Storage class. This class must be passed to the Show method so that the editor can modify the log informations.

The fields of the editor are set according to the 'format' parameter passed during the widget creation.

Each field feature a 'recall' button which will recall the last archived value of the field. You may click several times on the 'recall' button to get older values.

Constructor

LogEditor()

Parameters are :

  • format : data format array reference. The LogEditor widget content will match the content of this data structure

METHODS

Show()

This method displays the dialog, waits for the user to click either 'archive' or 'cancel'. If the user cancels the edition, Show returns 0.

If the user clicked 'archive', Show will store the edited data in the passed 'info' reference and returns 1.

Parameters are :

  • name: name of the VCS file

  • revision : revision number of the log version to edit

  • info: hash ref or Puppet::Storage object which contains the log to edit. If a hash ref is passed, its content will be modified, if a Puppet::Storage object is passed, its permanent data will be modified.

  • grab: If global is specified a global (rather than local) grab is performed.

DESCRIPTION FORMAT

See "DESCRIPTION FORMAT" in VcsTools::LogParser

Each item of the description must have a type. According to the type, the LogEditor will create a widget for this type:

  • line: The editor uses an Entry widget to edit this type.

  • enum: The editor uses a RadioButton widget to edit this type. The possible values of the Buttons are set by the 'values' parameter of the data format.

  • array: The editor uses an Entry widget to edit this type. Array element will be separated by a comma or a white space.

  • text: The editor uses an Text widget to edit this type.

AUTHOR

Dominique Dumont, Dominique_Dumont@grenoble.hp.com

Copyright (c) 1998-1999 Dominique Dumont. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO

perl(1), Tk(3), VcsTools::DataSpec::HpTnd(3)