Re: RFC - Tk::DualLists

Todd Littlefield <[email protected]> Thu, 11 Oct 2007 10:44:16 -0400
Newsgroups gmane.comp.lang.perl.tk
Message-ID <[email protected]>
Hi Marek,

    Thanks for the comments and suggestions.  My initial thoughts were 
that the
user would choose from the left and move to the right.  The right list would
become the 'working set' for the application.

    I was going to implement adding items via a  text entry on the left 
but hearing
your case, it makes sense to be on the right.  Why force the user to type
something they want and then make them click to move it to the other side.

    The delete method already works across both lists. I kind of assumed 
that
if an option needed to be removed, it should be deleted from wherever it 
appears.
Changing the AddItem to be AddItemLeft and make an AddItemRight method 
makes sense.
If someone wanted a mass entry system rather than just a one line entry, 
the AddItemRight
is needed.

    POD definitely isn't my forte, I'll merge your changes in and try to
implement the entry widget portion for 0.02.

    Thanks again for the feedback!

- Todd

[email protected] wrote:
> Hi Todd,
>
> I think this is a great module - a colleague here has
> written a similar thing some years ago, but that was
> not as elegant as yours.
>
> I'd like to suggest to add methods to modify the
> right hand side list as well (e.g. AddItemRight,
> DeleteItemRight). The application I am thinking of
> is a derived widget that offers the user to
> * select existing items from the left list
> * add new items with a text field + add button to
>   the right list
> You already said you are considering to implement
> this as an option to this widget, but the above is
> very cheap and allows the derived widget to choose
> an arbitrary arrangement of the "Add new..."
> button and/or fields.
>
> In an attempt to appreciate your work, I reviewed
> the POD and tried to adapt it to a more "standard"
> style, and fixing some bad POD syntax on the way.
> Feel free to use it (or not) :-)
>
> Cheers,
>
> Marek
>
>
> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Todd Littlefield
> Sent: Thursday, October 11, 2007 3:47 PM
> To: [email protected]
> Subject: RFC - Tk::DualLists
>
> Hello,
>
>     I recently had need to implement two list widgets with
> the ability to move items between them.  There didn't seem
> to be a comparable widget out on CPAN.  So, rather than just
> put the code in the script, it was made into a module.
>
>     It is attached with a test program as well.  The main pieces
> are there.  A couple of small issues like custom sorting
> of the lists, allowing duplicate entries, etc. need to be
> implemented to make it more flexible.  Also the ability to
> display a widget allowing the user to add items without
> needing to write extra code would be nice.
>
>     If any of the more knowledgeable Tk hackers would care to
> comment, I'd appreciate it.  Tips, pointers, suggestions and
> even gentle flames welcome...  If you have any serious flaming
> to do, please wait until December or January.  The additional
> heat will be welcome in the New England weather  ;-)
>
>     Thanks in advance.
>
> - Todd
>   

--++**==--++**==--++**==--++**==--++**==--++**==--++**==
ptk mailing list
[email protected]
https://mailman.stanford.edu/mailman/listinfo/ptk