[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] GetData.pm -- mini-announcement



George Michel recently, and others in the past, have raised the question of
how to get multiple data into a program from the user, without resorting to
multiple launches of MacPerl::Ask().

In an attempt to address this problem I have written a small module which
behaves somewhat like a PolyMacPerl::Ask(), capable of taking in (as
references to anonymous lists) any number of 'prompt' and 'default'
strings.

The window adjusts automatically to the number of prompt/default string
pairs and the number that can be accomodated is thus fundamentally limited
only by the size of the screen.

The 'default' strings can be edited and returned to the calling program as
a list. It is, more or less, a self-adjusting 'form' for the user to fill
in.

There are four buttons to control the window:

        'Cancel'  returns undef and clears window
        'Reset'   restores the window to the original query-state
        'Done'    returns a list and clears the window
        'Return'  terminates entries and 'cycles' round the window

The module is based on Dialogs.pm and is quite small (4k), comes with a
draft 'pod' (9k) and a small demo-script (1k). I would be happy to send
this package to anyone interested in these things and even happier to have
back some criticisms, suggestions for improvements or extensions and so
forth.

Alan Fry



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch