Re: Prima::Label question

From: Eric Lenio <lenio_at_lenio.net>
Date: Thu, 1 May 2003 15:39:56 -0400
To: Anton Berezin <tobez_at_tobez.org>

I have Solaris 5.9, gcc 3.2.2, perl 5.8.0 (threaded), Prima 1.10.

Is there any other test I could try that might shed some light on this?

Thanks,
ERic.

On Thu, May 01, 2003 at 10:29:50PM +0200, Anton Berezin wrote:
> Hi,
>
> The correct place for this question is prima_at_prima.eu.org mailing list,
> so I am Ccing it.
>
> First of all, I cannot reproduce your problem, it works ok for me.
>
> Second, what platform do you run this program on, and what Prima
> version?
>
> Cheers,
> \Anton.
>
> On Thu, May 01, 2003 at 03:23:09PM -0400, Eric Lenio wrote:
> > Gentlemen -
> >
> > I'm a long time perl user, and I just installed Prima - it looks very cool.
> >
> > I'm trying to build a simple message box: It displays a question in a
> > Prima::Label, then has 2 buttons: OK and Cancel. When I don't put a "~" in
> > the label I get a core dump. But the label really can't get focus, so I don't
> > want to put a "~" in the label. Any comment on this?
> >
> > Thanks,
> > Eric.
> >
> > Here is my little program:
> >
> > use Prima;
> > use Prima::Const;
> > use Prima::Buttons;
> > use Prima::Label;
> > use File::Basename;
> > my $exec=basename $0;
> > my $revision=q$Revision: 1.76 $;
> > $revision =~ s{\S+\s+(\d+\.\d+).*}{$1};
> >
> > my $title=shift || sprintf("%s version %s - Confirm",$exec,$revision);
> > my $msg=shift || "~Are you sure you want to exit VNC?\n\nNote: you should type 'exit' in all xterm\nwindows to close them first before exiting VNC.";
> >
> > $::application = Prima::Application-> create( name => "Generic.pm");
> >
> > my $w = Prima::Window-> create(
> > size => [ 400, 200],
> > text => $title,
> > onDestroy => sub { $::application-> destroy},
> > );
> >
> > my $cancel = $w-> insert(
> > Button => left => 100 => bottom => 10,
> > text => "~Cancel",
> > onClick => sub {
> > $::application->close;
> > exit 1;
> > },
> > );
> > my $ok = $w-> insert(
> > Button => left => 200=> bottom => 10,
> > text => "~OK",
> > onClick => sub {
> > $::application->close;
> > exit 0;
> > },
> > );
> >
> > $w-> insert( Label =>
> > # font => { height => 24},
> > origin => [ 25, 75],
> > text => $msg,
> > #focusLink => $cancel,
> > focusLink => undef,
> > wordWrap => 1,
> > height => 100,
> > width => 350,
> > alignment => ta::Center,
> > valignment => ta::Middle,
> > growMode => gm::Client,
> > #growMode => gm::GrowLoX,
> > showPartial => 1,
> > showAccelChar => 1,
> > );
> >
> >
> >
> > run Prima;
> >
>
> --
> Perl is strongly typed, it just has very few types. -- Dan Sugalski
Received on Thu 01 May 2003 - 22:41:13 CEST

This archive was generated by hypermail 2.2.0 : Sat 19 Mar 2011 - 18:35:04 CET