----- Original Message -----
From: "Autrijus Tang" <[EMAIL PROTECTED]>
To: "Sisyphus" <[EMAIL PROTECTED]>
Cc: "PAR" <[EMAIL PROTECTED]>
Sent: Saturday, March 29, 2003 1:44 AM
Subject: Re: Tk::Widget autoloading not working

> May I look at the code, or a reduced sample thereof, please? :-)

It's just some minimal code that someone else posted recently. The 'require'
statements are necessary only for the pp built executable to work. The
system() calls were just my way of copying the required '.al' files to the
current directory. I've left them there so you can readily see where those
files are located.

-----------------------------------------------------------
#!perl -w

  use Tk;
  use Tk::LabEntry;
  use Tk::Widget;
  use Tk::Frame;

  # start of additional pp coding
#  system "copy D:\\perl_M\\site\\lib\\auto\\tk\\frame\\addscrollbars.al
addscrollbars.al";
  require 'addscrollbars.al';
#  system "copy D:\\perl_M\\site\\lib\\auto\\tk\\frame\\freeze_on_map.al
freeze_on_map.al";
  require 'freeze_on_map.al';
#  system "copy D:\\perl_M\\site\\lib\\auto\\tk\\frame\\scrollbars.al
scrollbars.al";
  require 'scrollbars.al';
#  system "copy D:\\perl_M\\site\\lib\\auto\\tk\\frame\\queuePack.al
queuePack.al";
  require 'queuePack.al';
#  system "copy D:\\perl_M\\site\\lib\\auto\\tk\\frame\\packscrollbars.al
packscrollbars.al";
  require 'packscrollbars.al';
#  system "copy D:\\perl_M\\site\\lib\\auto\\tk\\scrollbar\\enter.al
enter.al";
  require 'enter.al';
#  system "copy D:\\perl_M\\site\\lib\\auto\\tk\\scrollbar\\leave.al
leave.al";
  require 'leave.al';
  # end of additional pp coding

  $mw = MainWindow->new;
  $scrollbar = $mw->Scrolled('Listbox');
  $scrollbar->insert(0, qw(hi bye));
  $scrollbar->pack();
  MainLoop;
------------------------------------------------------

As regards 'AddScrollbars' the original error was 'Can't locate
Tk/AddScrollbars.pm....'.

As regards all of the other require statements, the error they avoid is of
the type 'Failed to autoload blah.al' (where 'blah' is replaced by the name
of the subroutine in question).

Cheers,
Rob

Reply via email to