Dynamic Search Tool

X

xtracold

Hi folks,

I've been dabbling with Perl for some weeks now to build some tools for
use at work. I'm now looking to produce a simple search tool that will
extract a list of variable names from a given file (or set of files)
then dynamically sort this list of names as a user enters a search
string. It will be incorporated into a small Tk application that i'm
working on and at the moment I envisage using an entry field with each
keystroke bound to a reqexp match routine which repopulates the
displayed list from the master list on each key stroke.

Now, simply put, has anyone ever attempted this before? I'm concerned
that the binding to a key stroke event on the entry field will not
produce very fast results.

Thanks in advance for any advice

XC
 
X

xtracold

A. Sinan Unur said:
What have _you_ tried so far and what do you need help with?

Please read the posting guidelines for this group:

http://mail.augustmail.com/~tadmc/clpmisc/clpmisc_guidelines.html

If you need someone to write something to your specifications, this is not
the right place to ask. Instead, you might want to head over to
http://jobs.perl.org/

Sinan

I'm not looking for a written solution, i'm looking for peoples past
experience of binding to each keystroke event in an Tk::Entry widget
and what performance I can expect. Perhaps there is another existing
add-on that I don't know about that already does this?
 
J

James Willmore

On Wed, 08 Dec 2004 00:20:24 -0800, xtracold wrote:

I'm not looking for a written solution, i'm looking for peoples past
experience of binding to each keystroke event in an Tk::Entry widget
and what performance I can expect. Perhaps there is another existing
add-on that I don't know about that already does this?

Might I suggest that you take the above posting and re-post it to a more
appropriate newsgroup - comp.lang.perl.tk

Or, just read the Tk::Entry documentation and any documentation the
Tk::Entry documentation references, write some code, see how it works,
maybe do some benchmarking ... you know, see for yourself :)

I can say this - depending upon what you're trying to do, there are
widgets that have builtin key bindings that aid in making a robust bit of
code. For example, the Tk::Text widget has a very nice right-mouse click
menu ready to use that include the ability to go to a particular line of a
file. I believe that it also has the more common keystroke bindings (like
"Ctrl-C" to copy text and "Ctrl-V" to paste).

And I have found "Mastering Perl/Tk" (O'Reilly publishes this book -
*not* the "Learning Perl/Tk" book ... it's not as helpful as "Mastering
Perl/Tk") to be a very good reference with losts of good examples. This,
of course, is if you want to but a book :)

HTH

Jim
 
X

xtracold

James said:
On Wed, 08 Dec 2004 00:20:24 -0800, xtracold wrote:



Might I suggest that you take the above posting and re-post it to a more
appropriate newsgroup - comp.lang.perl.tk

Or, just read the Tk::Entry documentation and any documentation the
Tk::Entry documentation references, write some code, see how it works,
maybe do some benchmarking ... you know, see for yourself :)

I can say this - depending upon what you're trying to do, there are
widgets that have builtin key bindings that aid in making a robust bit of
code. For example, the Tk::Text widget has a very nice right-mouse click
menu ready to use that include the ability to go to a particular line of a
file. I believe that it also has the more common keystroke bindings (like
"Ctrl-C" to copy text and "Ctrl-V" to paste).

And I have found "Mastering Perl/Tk" (O'Reilly publishes this book -
*not* the "Learning Perl/Tk" book ... it's not as helpful as "Mastering
Perl/Tk") to be a very good reference with losts of good examples. This,
of course, is if you want to but a book :)

HTH

Jim

Thanks Jim, in the end I just put together something simple and it
seemed to work. If I remember i'll post what I did on the Tk newsgroup
when I get to work tomorrow!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,563
Members
45,039
Latest member
CasimiraVa

Latest Threads

Top