Ask a Question related to PERL Miscellaneous, Design and Development.
-
derek / nul #1
Problem with tk and displaying on the screen
I have just copied this program from a book (Active perl Developers Guide)
I get an error:-
Undefined subroutine &main::MainLoop called at tk2.pl line 28. (MainLoop();)
What have I missed?
Derek
#win32 Activestate 5.8.0
use strict;
use warnings;
use tk;
my $main;
my $label;
my $button;
my $icon;
$main = MainWindow->new();
$main->title("Hello World!");
$label = $main->Label(text => 'Hello from tk!');
$button = $main->Button();
$icon = $button->Photo(-file => 'icon.gif');
$button->configure(image => $icon,
command => sub { exit; }
);
$label->pack(side => 'left');
$button->pack(side => 'left',
padx => 5
);
MainLoop();
derek / nul Guest
-
Lost the on-screen visual intent of displaying "out-of-gamut" colors.
I won't go into details on why I want this preference back, so I'll just keep this shorter by asking: For some reason I lost my ability to apply "out... -
FH 10 problem with EPS displaying
I have problem, please help me. When I importing EPS files (without TIFF preview) in FH 10 for Win, I see only blank boxes. Where is the problem?... -
Problem displaying ASP pages
I just setup a windows 2003 web edition server and having problems displaying asp page from the server. I set the web extensions in IIS to allow... -
Displaying an html page in a director screen, is it possible?
The question says it all, is it possible to display an html page (wich is online) in Director. I am making an interactive cd-rom (with a friend of... -
problem when displaying image
Hi, I made this code the retrive some info from my access DB, then choose another image from Products folder(images were not saved in DB)... -
derek / nul #2
Re: Problem with tk and displaying on the screen
On Tue, 1 Jul 2003 18:44:50 +0200, "Markus W." <ehm.weihs@utanet.at> wrote:
Undefined subroutine &tk::MainLoop called at tk2.pl line 28.>Hi Derek!
>
>Try Tk::MainLoop();
??
>"derek / nul" <abuse@sgrail.org> schrieb im Newsbeitrag
>news:6gc3gv0l5ujfdkmqhgl5v1rb2v78d1e314@4ax.com.. .>(MainLoop();)>> I have just copied this program from a book (Active perl Developers Guide)
>>
>> I get an error:-
>>
>> Undefined subroutine &main::MainLoop called at tk2.pl line 28.>>>
>> What have I missed?
>>
>> Derek
>>
>>
>>
>> #win32 Activestate 5.8.0
>>
>> use strict;
>> use warnings;
>> use tk;
>>
>> my $main;
>> my $label;
>> my $button;
>> my $icon;
>>
>> $main = MainWindow->new();
>> $main->title("Hello World!");
>>
>> $label = $main->Label(text => 'Hello from tk!');
>> $button = $main->Button();
>>
>> $icon = $button->Photo(-file => 'icon.gif');
>> $button->configure(image => $icon,
>> command => sub { exit; }
>> );
>>
>> $label->pack(side => 'left');
>> $button->pack(side => 'left',
>> padx => 5
>> );
>>
>> MainLoop();
>>derek / nul Guest
-
derek / nul #3
Re: Problem with tk and displaying on the screen
good call and thank you.
The use tk; was wrong
put in use Tk; and all is well
many thanks
On Tue, 1 Jul 2003 19:00:45 +0200, "Markus W." <ehm.weihs@utanet.at> wrote:
,snip>^^^^^^^^^^^^^^^^^^^^>Did you write
> tk::MainLoop()
>or
> Tk::MainLoop()
>?
>
>>> >> #win32 Activestate 5.8.0
>> >>
>> >> use strict;
>> >> use warnings;
>> >> use tk;>>>>> >> my $main;
>> >> my $label;
>> >> my $button;
>> >> my $icon;
>> >>
>> >> $main = MainWindow->new();
>> >> $main->title("Hello World!");
>> >>
>> >> $label = $main->Label(text => 'Hello from tk!');
>> >> $button = $main->Button();
>> >>
>> >> $icon = $button->Photo(-file => 'icon.gif');
>> >> $button->configure(image => $icon,
>> >> command => sub { exit; }
>> >> );
>> >>
>> >> $label->pack(side => 'left');
>> >> $button->pack(side => 'left',
>> >> padx => 5
>> >> );
>> >>
>> >> MainLoop();
>> >>
>> >derek / nul Guest
-
Brian Helterline #4
Re: Problem with tk and displaying on the screen
"derek / nul" <abuse@sgrail.org> wrote in message
news:q2g3gvka9ougjqmk7ejjhvga0n8b7hhbmj@4ax.com...This is a nasty little feature of Windows (or any case-insensitive OS)> good call and thank you.
>
> The use tk; was wrong
When it looks for the file to 'use', it succeeds since the OS is doing
the searching in a case-insensitive manner. When perl looks for the
functions
that were imported, it does it itself in a case-sensitive manner and fails!
Anyone know of a way to fix this?
-brian
{snip rest of thread}
Brian Helterline Guest
-
Bob Walton #5
Re: Problem with tk and displaying on the screen
Brian Helterline wrote:
....> "derek / nul" <abuse@sgrail.org> wrote in message
> news:q2g3gvka9ougjqmk7ejjhvga0n8b7hhbmj@4ax.com...> This is a nasty little feature of Windows (or any case-insensitive OS)
> When it looks for the file to 'use', it succeeds since the OS is doing
> the searching in a case-insensitive manner. When perl looks for the
> functions
> that were imported, it does it itself in a case-sensitive manner and fails!
>
> Anyone know of a way to fix this?
use Linux;-)
-->
> -brian
Bob Walton
Bob Walton Guest
-
Helgi Briem #6
Re: Problem with tk and displaying on the screen
On Tue, 1 Jul 2003 14:06:03 -0700, "Brian Helterline"
<brian_helterline@hp.com> wrote:
Learn to spell properly.>>> The use tk; was wrong
>This is a nasty little feature of Windows (or any case-insensitive OS)
>When it looks for the file to 'use', it succeeds since the OS is doing
>the searching in a case-insensitive manner. When perl looks for the
>functions that were imported, it does it itself in a case-sensitive
>manner and fails!
>
>Anyone know of a way to fix this?
Helgi Briem Guest



Reply With Quote

