Curses::UI: No definition found for '< Yes >'

Ask a Question related to PERL Modules, Design and Development.

  1. #1

    Default Re: Curses::UI: No definition found for '< Yes >'

    Chasecreek Systemhouse wrote:
    > On 7/10/06, Mumia W. <mumia.w.18.spam+nospam@earthlink.net> wrote:
    >> I'm trying to learn to use Curses::UI, and I read the top of "perldoc
    >> Curses::UI" and found some example code. Unfortunately, it doesn't work.
    >> This is my program:
    >>
    >> #!/usr/bin/perl
    >>
    >> use strict;
    >> use warnings;
    >> use Curses::UI;
    >>
    >> my $cui = new Curses::UI (-color_support => 1);
    >> my $my = $cui->dialog(
    >> -message => 'Hello World.',
    >> -buttons => ['< Yes >', '< No >'],
    >> -values => [1, 0],
    >> -title => 'First Dialog',
    >> );
    >>
    >> __END__
    >>
    >> When I run this program, I get this error message:
    >>
    >>> > Fatal program error:
    >>> > ------------------------------------------
    >>> > process_buttondefs(): Invalid button type.
    >>> > No definition found for '< Yes >'
    >>> > ------------------------------------------
    >>> > Press any key to exit...
    >>
    >
    > The Curses::UI refers you to a more appropriate example. The example's syntax:
    >
    > use FindBin;
    > use lib "$FindBin::RealBin/../lib";
    >
    > use strict;
    > use Curses::UI;
    > [...]
    >
    > In other words, the < Yes > was supposed to be the label of a button;
    > not a button itself...
    >
    > HTH/Sx
    Thanks. I wanted something simple to start with, and after reading
    Curses::UI::Buttonbox's doc page, I created a simple example that works:

    #!/usr/bin/perl

    use strict;
    use warnings;
    use Curses::UI;

    my $cui = new Curses::UI (-color_support => 1);

    my $my = $cui->dialog(
    -message => 'Hello World.',
    -buttons => ['yes', 'no'],
    -values => [1, 0],
    -title => 'First Dialog',
    );

    __END__

    'Yes' and 'no' are pre-defined button names. Perhaps the example code in
    Curses::UI should be changed.


    Mumia W. Guest

  2. Similar Questions and Discussions

    1. CDK vs Curses::UI
      Hi all, We're implementing a UI in curses. Anyone have any opinions on the pros and cons of these two toolkits? Antony
    2. Curses does not compile
      I am trying to compile the module Curses perl -MCPAN -e shell install Curses The compilation stops with the following message: .... In file...
    3. Compiling Curses in OS X for Perl
      A note to anyone wanting to get Curses to compile under OS X 10.2.6. I had to make some changes to the standard c-config.h hints file, the old...
    4. ruby curses documentation ?
      hello, I would like to start to learn using curses with ruby. I don't know nothing about curses. Is there existing any documentation about the...
    5. Curses compile problems
      newbie needs help with Curses. I used source code to compile my own Perl 5.8 using gcc compiler. I need to get Curses working but get the...
  3. #2

    Default Re: Curses::UI: No definition found for '< Yes >'

    Mumia W. wrote:
    > [...] I created a simple example that works:
    >
    > #!/usr/bin/perl
    >
    > use strict;
    > use warnings;
    > use Curses::UI;
    >
    > my $cui = new Curses::UI (-color_support => 1);
    >
    > my $my = $cui->dialog(
    > -message => 'Hello World.',
    > -buttons => ['yes', 'no'],
    > -values => [1, 0],
    > -title => 'First Dialog',
    > );
    >
    > __END__
    >
    > 'Yes' and 'no' are pre-defined button names. Perhaps the example code in
    > Curses::UI should be changed.
    >
    >
    I mean, perhaps the documentation in Curses::UI should
    be changed.

    Mumia W. Guest

  4. #3

    Default Re: Curses::UI: No definition found for '< Yes >'

    "Mumia W." <mumia.w.18.spam+nospam.usenet@earthlink.net> writes:

    > I mean, perhaps the documentation in Curses::UI should
    > be changed.
    Agreed. The best way for this to happen is to log a request
    on rt.cpan.org.

    [url]https://rt.cpan.org/Dist/Display.html?Queue=Curses-UI[/url]

    Cheers

    --
    Dominique Dumont
    "Delivering successful solutions requires giving people what they
    need, not what they want." Kurt Bittner
    Dominique Dumont Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139