Can't get passed 'use tk;' in my 1st perl/tk program.I'm trying to run my 1st perl/tk program and can't get passed the
"use Tk;" command. I get error, "Can't locate Tk.pm" and if I add a "use
lib" pointer to directory containing Tk.pm, I get error message "Can't
locate loadable object for module Tk::Event". SEE BELOW for actual
scripts and error messages.
Environment: Mac OS x 10.3.8; perl version 5.8.1; Tk directory
Tk-804.027.
Experince level: Used to write lots of perl code, 15 years ago on
Sun/unix. Just wrote my 1st perl code on MAC. This is my first try at
pe...
[tk] Equivalent to Perl's Tk::Tiler?Hi All:
I making arbitrarily large forms and in doing similar in Perl, I've
used Tk::Tiler, a scrollable frame. I'd just pack my various entries
into the form, and set a max size, from which the form would
automatically scroll if the contents were larger than the form size.
I've found a scrollable canvas sample I could use, but worry about the
of resources it might take up. Any pointers?
Thanks.
Forrest
From: Forrest Chang <fkc_email-news@yahoo.com>
Subject: [tk] Equivalent to Perl's Tk::Tiler?
Date: Tue, 6 Dec 2005 02:17:33 +0900
Message-ID: <81lkyz79...
Re: Small pb to build Tk beta10 with debian's dh-make-perl (was: CPAN Upload: N/NI/NI-S/Tk-804.025_beta10.patch.gz)Dominique Dumont <domi@komarr.grenoble.hp.com> writes:
>Hello
>
>Nick Ing-Simmons <nick@ing-simmons.net> writes:
>
>> Pause <cpan-testers@perl.org> writes:
>>>The uploaded file
>>>
>>> Tk-804.025_beta10.patch.gz
>>>
>>>has entered CPAN as
>>
>> And the tar ball is on its way.
>
>There's small but annoying permission problem with some files:
>
>The tar ball contains:
>-r--r--r-- nick/users 4977 2003-12-10 10:37:05 Tk-804.025_beta10/pTk/tk.t
>
>After a p...
UI design for Tk app--PNG's or GIF's for icons?I hope this isn't too off-topic. I'm curious as to what others think
about the question of gif or png files for icons in a Tk application.
I know gif's are more commonly used by Tk developers, likely because
gif's are supported natively and some de-facto Tk stock icons (such as
those that ship with BWidgets) are gif's. Other formats require the Img
extension.
Some say that png's look smoother than gifs, which can be jaggy, and
this may subtly contribute to user perceptions about an application's
polish. So: does anyone use png's in their applications? Or is this,
perhaps, more a matter of the overall application design/look/feel than
a single factor like the image format of the icons? (Looking at Eclipse,
where a huge amount of care has gone into the UI design and where the
icons are gifs, leads me to think that this is the case.)
--
Kevin Walzer
Code by Kevin
http://www.codebykevin.com
Kevin Walzer <kw@codebykevin.com> writes:
>Some say that png's look smoother than gifs, which can be jaggy, and
>this may subtly contribute to user perceptions about an application's
>polish. So: does anyone use png's in their applications? Or is this,
>perhaps, more a matter of the overall application design/look/feel than
>a single factor like the image format of the icons? (Looking at Eclipse,
>where a huge amount of care has gone into the UI design and where the
>icons are gifs, leads me to think that this is the ...
Re: Tk's lack of "chrome" (prompted by Re: Tk::FunkyButton ?)--- Nick Ing-Simmons <nick@ing-simmons.net> wrote:
>
> I have had various of list (and even day job)
> complaints that perk/Tk
> "looks old fashioned".
As far as I know, all of this is being addressed in
the latest versions of Tk. Now, we should have native
support on different platforms, and themes are coming.
So the situation will change.
> Also tracking/converting Tcl/Tk is a pain (and core
> Tk is where
> most of the "look" comes from).
>
> So for perl6 (when it comes) I would rather
> write/help-out-with a
&g...
Re: Tk's lack of "chrome" (prompted by Re: Tk::FunkyButton ?) #3Dean Arnold wrote:
> Dean Arnold wrote:
>
> > 3) Have you considered the browser based alternatves ? (Forgive
> > the buzzwords) People are doing some amazing things w/ AJAX,
> > and with the availablity of XUL and/or XAML (or whatever MSFT
> > is calling Avalon these days), the browser seems to be the direction
> > everyone is headed.
>
> Followup: for an idea whats possible w/ Javascript + XUL, see
>
> http://www.hacksrus.com/~ginda/venkman/screenshots/venkman-20030427.gif
>
> (Venkman is a Javascript debugger (IDE, ...
Re: Tk's lack of "chrome" (prompted by Re: Tk::FunkyButton ?) #8Ala Qumsieh <ala_qumsieh@yahoo.com> writes:
>--- Nick Ing-Simmons <nick@ing-simmons.net> wrote:
>
>>
>> I have had various of list (and even day job)
>> complaints that perk/Tk
>> "looks old fashioned".
>
>As far as I know, all of this is being addressed in
>the latest versions of Tk. Now, we should have native
>support on different platforms, and themes are coming.
>So the situation will change.
Well perhaps I should take a look at what they are up to.
>
>One thing that was mentioned a few times here, ...
RE: Tk's lack of "chrome" (prompted by Re: Tk::FunkyButton ?) #18Vadim Konovalov <vkonovalov@spb.lucent.com> writes:
>
>What is wrong with non-western language support in perl/Tk or tcl/tk, BTW?
1. Direction support e.g. right to left for Arabic or Hebrew script,
and (I think) vertical for Chinese to have a traditional look.
2. Composite characters - while western scripts typically have precomposed
accented characters à and digraphs Æ with other scripts these have
to be done by kerning accents into right place relative to base
character.
3. Context dependant glyphs - Arabic has one code point represented
...
RE: Tk's lack of "chrome" (prompted by Re: Tk::FunkyButton ?) #6> > I have had various of list (and even day job)
> > complaints that perk/Tk
> > "looks old fashioned".
>
> As far as I know, all of this is being addressed in
> the latest versions of Tk. Now, we should have native
> support on different platforms, and themes are coming.
> So the situation will change.
Actually Tcl/Tk has 'tile', which makes fully native usage of widgets in
many cases; it is not available in perl/Tk yet.
....
> Jeff seemed to imply that the way Perl/Tk is currently
> implemented makes it a slow proce...
Re: Tk's lack of "chrome" (prompted by Re: Tk::FunkyButton ?) #14Hans Jeuken <haje@toneel.demon.nl> writes:
>It's not a very serious note what i have to say,
>but in all the shiny glittery new gui's like qt and gtk(2)
>and wrappers like wx, somehow, i don;t find
>perl/Tk looking old fashioned looking, as i have seen
>other people saying in this discussion,
>if you take a little care of your xresources file.
I well thought out set of xresources can help X11
for sure. Windows might be a little more tricky
as core tk (as currently ported) aims to use "native look".
A VERY simple project would be to make them the perl/Tk
compiled-in-defaults
>
>http://www.toneel.demon.nl/codit_screenshot.png
Pink isn't my colour ;-)
>
>Hans
>-++**==--++**==--++**==--++**==--++**==--++**==--++**==
>This message was posted through the Stanford campus mailing list
>server. If you wish to unsubscribe from this mailing list, send the
>message body of "unsubscribe ptk" to majordomo@lists.stanford.edu
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server. If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@lists.stanford.edu
...
Re: Tk's lack of "chrome" (prompted by Re: Tk::FunkyButton ?) #16Konovalov, Vadim wrote:
> <>
> What is wrong with non-western language support in perl/Tk or tcl/tk, BTW?
For one, it is currently limited to Character encodings, and limited
support of Unicode, unless I missed something. There are other aspects
to consider for several langauges. Support for special input methods,
bidi support for languages that read right-to-left. Support for
diacritics and more complex ligatures which suggest on-the-fly
transformations as data is input. Some of these things are lofty goals
but are being tackled in other GUI toolkits. CJK langu...
RE: Tk's lack of "chrome" (prompted by Re: Tk::FunkyButton ?) #4> -----Original Message-----
> From: owner-ptk@lists.Stanford.EDU
> [mailto:owner-ptk@lists.Stanford.EDU] On Behalf Of Nick Ing-Simmons
> Sent: December 6, 2005 1:51 PM
> To: ptk@lists.Stanford.EDU
> Subject: Tk's lack of "chrome" (prompted by Re: Tk::FunkyButton ?)
>
>
> I have had various of list (and even day job) complaints that
> perk/Tk "looks old fashioned".
>
> Also tracking/converting Tcl/Tk is a pain (and core Tk is
> where most of the "look" comes from).
>
> So for perl6 (when it come...
Re: Tk's lack of "chrome" (prompted by Re: Tk::FunkyButton ?) #17On Fri, 2005-12-09 at 21:53, Rob Seegel wrote:
> Konovalov, Vadim wrote:
>
> > <>
> > What is wrong with non-western language support in perl/Tk or tcl/tk, BTW?
>
> For one, it is currently limited to Character encodings, and limited
> support of Unicode, unless I missed something. There are other aspects
> to consider for several langauges. Support for special input methods,
> bidi support for languages that read right-to-left. Support for
you're right about right-to-left (bidi), thanks for pointing this.
I'm not sure about ...
Re: Tk's lack of "chrome" (prompted by Re: Tk::FunkyButton ?) #12Paul Falbe <paul@cassens.com> writes:
>Now seems a good time to mention some work we've been doing
>with froglogic.com. I needed to do some programming for PDAs running
>Qtopia. Since, I am better programmer in PerlTk then C++/Qt
>I commissioned Harri Porten of froglogic.com to build me
>perlTk emmulator if you will using the Qt toolkit instead
>of Tk. The project is far enough along that I have a 7300+
>Pq (Perl with Qt) project. The syntax is perlTk but
>uses Qt.
Sounds interesting.
Qt is another option. My preference for gtk is mainly bia...
Re: Tk and xdefaults on windows (prompted by Re: Tk's lack of "chrome") #2Nick Ing-Simmons <nick@ing-simmons.net> writes:
> Hans Jeuken <haje@toneel.demon.nl> writes:
> >> I well thought out set of xresources can help X11
> >> for sure. Windows might be a little more tricky
> >> as core tk (as currently ported) aims to use "native look".
> >>
> >
> >A couple of years ago i had a W98 machine and i was
> >sharing my linux home folder on that machines through
> >samba. When launching a perl/Tk script from that
> >shared drive on the W98 it used the settings in
> >the .Xdefaults file in my homedirectory on my linux
> >machine. I do not remember if all settings were correct,
> >but at least background colours matched.
>
> I know how basics work as I have used them myself.
> You are correct that for some meaning of "home directory"
> (which isn't really a Win32 concept)
I once found this API call:
my $server = get_domain_server();
if (defined $server) {
my($userinfo) = {};
Win32API::Net::UserGetInfo($server, Win32::LoginName(), 2, $userinfo);
if ($userinfo) {
return $userinfo->{homeDir}; # this is the "home" directory
}
}
Which probably only works in a networked windows environment.
Otherwise there are some environment variables which possibly denote a
"home" directory: HOMEDRIVE+HOMEPATH, USERPROFILE,...
'use Data::Dumper' in Tk beta6's Menu.pmI'm getting this error running basic_demo and some of the other demos
in beta6.
Can't load 'C:/perl/5.8.2/lib/MSWin32-x86-multi-thread/auto/Data/Dumper/Dumper.dll' for module Data::Dumper: load_file:�@�~�����C at C:/perl/5.8.2/lib/MSWin32-x86-multi-thread/XSLoader.pm line 68.
at C:/perl/5.8.2/lib/MSWin32-x86-multi-thread/Data/Dumper.pm line 27
Compilation failed in require at C:/perl/site/5.8.2/lib/MSWin32-x86-multi-thread/Tk/Menu.pm line 1005.
at C:/perl/5.8.2/lib/MSWin32-x86-multi-thread/Data/Dumper.pm line 1005
BEGIN failed--compilation aborted at C:/perl/site/5.8...
S*S'-> make a code program of DIFF (S) for S to excute expression:S*S, ( S=vector, S'=dS/dt). ideas to all?hello everyone,
now i need a help of ideas for a program style from all to find :S*S'.
here we would not be able to use directly Diff( S) cuz of error of unsame size of S & diff( S).
soo i dlove to get any code PROGRAM STYLEs for function S' ( dS/dt) to Find S*S', with S: vector, for example as a begining input:
t=0:10;
S=2*t.^3 +3*t;
Now make a code program to DEFINE S' by ALGORITHM of MATH.
dear all, my question going well for understanding??
iam waiting for all.
( hey, give a trial into the world of Math of Algorithm for function & diveritative)-)
...
Re: for Jimmie the button's rural, about me it's long, whereas on you it's pulling easyUntil Karen answers the trees mercilessly, Joie won't open any
long sunshines. Better lift dryers now or Jezebel will usably
believe them before you. Both changing now, Larry and Patrice
solved the rude lanes about pathetic diet. Generally, Jimmy never
converses until Kathy recollects the wet twig tamely. Sam moulds the
fork among hers and firmly cleans. Her egg was hollow, shallow, and
lives among the corner. Get your cruelly calling yogi over my
barn. If you will learn Zack's night against plates, it will
strangely scold the car. It can recommend the cold unit and
cl...
for Frederic the pool's upper, with me it's easy, whereas within you it's calling handsomeSome hot code or stable, and she'll wickedly irritate everybody.
She wants to dream weak elbows in Jimmie's desert. Both cooking now,
Thomas and Kirsten wandered the bizarre satellites inside sad
painter. No trees will be bad elder cases. Will you arrive
between the hill, if Steven fully helps the unit?
You finally pull pathetic and solves our lower, clever twigs
towards a hallway. Where will we tease after Norbert attacks the
hollow stadium's tyrant? Otto, in back of wrinkles good and
active, climbs on it, departing subtly. I am partly bitter, so I
scold you. W...
For Hakeem the habitat's thorough, in particular me it's respective, whereas of course you it's arousing nineteenth-century.Who will we require after Owen extracts the excessive bowel's
debt? These days, it intervenes a reservation too overseas v her
brilliant junction. Everyone rather mix level and approachs our
slim, tall heats in line with a kiosk. Sometimes, go renew a
identification! The teenagers, swimmings, and riots are all
conceptual and prepared.
Do not surprise the markets totally, oppose them weekly. Many
improved bucket or pit, and she'll undoubtably forgive everybody.
If you'll affect Kirsten's corridor with staircases, it'll precisely
anticipate the separation. ...
Including .so's and .a's in my programI read somewhere that in order to use some header files (that are
available for d/l) I must use either the .so or the .a file. It says
that .so stands for Shared Object file (I knew that) and that .a
stands for Archive file. But how am I supposed to include those files
with my code? I don't think I can link them cuz I think I can only
like object files (.o) but I may be wrong. And which one would you
suggest? .so or .a?
BTW: I'm using GCC 3.3.2 if that's of any help
Thanks in advance,
- cmad
"Chris Mantoulidis" <cmad_x@yahoo.com> wrote in message
news:a8587dd9.0402290940.1154b761@posting.google.com...
> I read somewhere that in order to use some header files (that are
> available for d/l) I must use either the .so or the .a file. It says
> that .so stands for Shared Object file (I knew that) and that .a
> stands for Archive file. But how am I supposed to include those files
> with my code? I don't think I can link them cuz I think I can only
> like object files (.o) but I may be wrong. And which one would you
> suggest? .so or .a?
>
> BTW: I'm using GCC 3.3.2 if that's of any help
>
> Thanks in advance,
> - cmad
You can 'link' an 'so' or an 'a' just as you would
a 'o' (object file). See the GCC docs for details.
An archive (.a) is merely a collection of '.o'
files contained within one file - the '.a' file.
The linker will extract copies of the req...
Trial of Musatov's theory: double spaced 'e x p a n d s' and single spaced 'c o n t r a c t s'. Does the spacing post-processing appear equal? If so, what force was lost and where did it gMusatov's theory 'The space between spaces expands and contracts.'
Would this give time a direction? Musatov
...
Proposed Modules: Tk::MDTextBook (renamed: Tk::MIMEApp, Tk::Markdown, Tk::MarkdownTk)A set of modules that allow easy mixing of code types to be interpretted as
a Tk application...
The input is in MIME-multipart/mixed format, and easy entity can be markdown
(displayed formatted
in a Text with options to add Tk windows and behaviours), perl (eval()ed),
yaml (structure made available
to app) or menu in yaml (posted on main mindow).
The purpose of this is to contribute to a compiled program (for
Windows/Mac/Linux) that can run appended scripts in this format. The reason
for having this format is that resources can be included in the one file.
The Markdown stuff
is to allow easy inclusion of controls in the context of a document.
Tk::MDText - a Tk::Text that displays Markdown with Tk "tags" to include
widgets inline.
Tk::MDTextBook - a Tk::NoteBook that reads multipart document and contructs
an app (using MDTexts)
Tk::MDTextBook::Data2Tk - quick sub to make a window and give <DATA> to
Tk::MDTextBook
Does that make sense to anybody?? Here's an example:
E.g.:
use strict;
use Tk::MDTextBook::Data2Tk; # exports one sub:
data2tk;
__DATA__
MIME Version: 1.0
Content-Type: multipart/mixed; boundary=##--##--##--##--##
Title: Window Title
Here is a prologue
--##--##--##--##--##
Content-Type: application/x-ptk.markdown
Title: _Basic MarkDown
ID: Page1
# MarkDown Tk Text Thingy.
## Here is a sub-header
And a paragraph here
because I wanted to
check that it handles stuff
right over...
Re: Proposed Modules: Tk::MDTextBook [renamed Tk::MIMEApp, Tk::Markdown, Tk::MarkdownTkA set of modules that allow easy mixing of code types to be interpretted as
a Tk application...
The input is in MIME-multipart/mixed format, and easy entity can be markdown
(displayed formatted
in a Text with options to add Tk windows and behaviours), perl (eval()ed),
yaml (structure made available
to app) or menu in yaml (posted on main mindow).
The purpose of this is to contribute to a compiled program (for
Windows/Mac/Linux) that can run appended scripts in this format. The reason
for having this format is that resources can be included in the one file.
The Markdown stuff
is to allow easy inclusion of controls in the context of a document.
Tk::MDText - a Tk::Text that displays Markdown with Tk "tags" to include
widgets inline.
Tk::MDTextBook - a Tk::NoteBook that reads multipart document and contructs
an app (using MDTexts)
Tk::MDTextBook::Data2Tk - quick sub to make a window and give <DATA> to
Tk::MDTextBook
Does that make sense to anybody?? Here's an example:
E.g.:
use strict;
use Tk::MDTextBook::Data2Tk; # exports one sub:
data2tk;
__DATA__
MIME Version: 1.0
Content-Type: multipart/mixed; boundary=##--##--##--##--##
Title: Window Title
Here is a prologue
--##--##--##--##--##
Content-Type: application/x-ptk.markdown
Title: _Basic MarkDown
ID: Page1
# MarkDown Tk Text Thingy.
## Here is a sub-header
And a paragraph here
because I wanted to
check that i...
I can wrap my bindings for debugging -- but it "confuses" 'Tk::Ev'sI'm deriving from Devel::TraceCalls to to see what's going on inside
my Perl/Tk application. All works well for normal function calls. But
the bindings for keyboard etc. (which would be very helpful to see in
the trace) are often anonymous subs -- which Devel::TraceCalls can not
trace. So I'm wrapping them like this(excerpt!):
my $curbnd = $subw->bind($tag, $sequence);
my $method = $curbnd->[0];
my @params = @{$curbnd}[1..$#$curbnd];
local *$id = sub{ $subw->$method(@params) };
trace_calls{ Subs => [$id] };
$subw->bind($tag, $sequence => \&$id);
where $id is a string containing a name for the wrapper sub.
This works nicely unless the Tk::Callback in $curbnd contains a Tk::Ev
Example: for a Tk::Entry, <Key> is bound to
$VAR1 = bless( [
'Insert',
bless( do{\(my $o = 'A')}, 'Tk::Ev' )
], 'Tk::Callback' );
If my key is the down arrow this should insert nothing, because Ev(A)
evaluates to the empty string for non-unicode keys. In my wrapped
version, however, it inserts a literal 'A'
Any idea how to fix this?
Regards,
Wolfram
Ok, found my answer:
from perldoc Tk::callbacks: "Ev(...) inserts callback objects into the
argument list. When perl/Tk glue code is preparing the argument list
for the callback it is about to call it spots these special objects
and recursively applies the callback process to them....