ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> incrtcl-develop
incrtcl-develop
[Incrtcl-develop] [ incrtcl-Iwidgets Bugs-1563013 ] entryfield paste behavior busted
by SourceForge.net other posts by this author
Sep 21 2006 10:19AM messages near this date
Re: [Incrtcl-develop] Tcl's TIP 278 | [Incrtcl-develop] [ incrtcl-Iwidgets Bugs-1560742 ] frameTag is not updated/resized after startup
Iwidgets Bugs item #1563013, was opened at 2006-09-21 12:19
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=383687&aid=1563013&group_id=13244

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: EntryField
Group: 4.0.0
Status: Open
Resolution: None
Priority: 5
Submitted By: Bryan Oakley (boakley)
Assigned to: Chad Smith (smithc)
Summary: entryfield paste behavior busted

Initial Comment:
Wow, how can a bug like this go unnoticed for so long?

The short version is, when pasting into a entryfield,
length validation will be performed based on the
contents and configuration of the most recently created
entryfield rather than on the entryfield with the focus.

in entryfield.tcl is this happy bit of code:

    if {($itk_option(-pasting))} {
        bind pastetag <ButtonRelease-2>  [itcl::code
$this _checkLength]
        bind pastetag <Control-v>  [itcl::code $this
_checkLength]
        bind pastetag <Insert>  [itcl::code $this
_checkLength]
        bind pastetag <KeyPress>  {}
    } else {
        bind pastetag <ButtonRelease-2>  {break}
        bind pastetag <Control-v>  {break}
        bind pastetag <Insert>  {break}
        bind pastetag <KeyPress>  {
            # Disable function keys >  F9.
            if {[regexp {^F[1,2][0-9]+$} "%K"]} {
	            break
            }
        }
    }

Notice that it redefines the bindings to "pastetag"
each time the code runs even though "pastetag" has a
global effect. The result is that the _checkLength will
always compare the length of the data to be pasted
against the contents of the last entryfield to have
been created.

The solution is to either rip out all the attempts at
being clever about paste, or create a unique paste
bindtag for every entryfield object.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=383687&aid=1563013&group_id=13244

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Incrtcl-develop mailing list
Incrtcl-develop@[...].net
https://lists.sourceforge.net/lists/listinfo/incrtcl-develop

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved