Dynamic Search Tool

Discussion in 'Perl Misc' started by xtracold, Dec 7, 2004.

  1. xtracold

    xtracold Guest

    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
    xtracold, Dec 7, 2004
    #1
    1. Advertising

  2. "xtracold" <> wrote in
    news::

    > Now, simply put, has anyone ever attempted this before?


    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
    A. Sinan Unur, Dec 8, 2004
    #2
    1. Advertising

  3. xtracold

    xtracold Guest

    A. Sinan Unur wrote:
    > "xtracold" <> wrote in
    > news::
    >
    > > Now, simply put, has anyone ever attempted this before?

    >
    > 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?
    xtracold, Dec 8, 2004
    #3
  4. 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
    James Willmore, Dec 8, 2004
    #4
  5. xtracold

    xtracold Guest

    James Willmore wrote:
    > 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


    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!
    xtracold, Dec 9, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tandem person

    global search and replace tool

    Tandem person, Oct 22, 2003, in forum: Perl
    Replies:
    4
    Views:
    498
    J├╝rgen Exner
    Oct 23, 2003
  2. enanito

    RQ help with Java search Tool

    enanito, Oct 28, 2003, in forum: Java
    Replies:
    1
    Views:
    322
    Marco Schmidt
    Oct 28, 2003
  3. Bob N.

    Search Replace Tool

    Bob N., Jan 2, 2004, in forum: HTML
    Replies:
    12
    Views:
    682
  4. Abby Lee
    Replies:
    5
    Views:
    381
    Abby Lee
    Aug 2, 2004
  5. xtracold

    Dynamic Search Tool

    xtracold, Dec 7, 2004, in forum: Perl Misc
    Replies:
    0
    Views:
    71
    xtracold
    Dec 7, 2004
Loading...

Share This Page