My point is that we can treat these labels as buttons and use the same global vars as they do. They will still work as long as we use them the same way they do. So this new global variable you are talking about already exists.
----- Original Message ----- From: "Youness Alaoui" <[EMAIL PROTECTED]> To: "Mailing list for developers and everyone helping AMSN" <amsn-devel@lists.sourceforge.net> Sent: Monday, February 19, 2007 8:56 PM Subject: Re: [Amsn-devel] 0.97 TODO > button.tcl doesn't have anything to do with %X %Y... I just looked and it seems the ::tk::ButtonUp { w } > doesn't check for mouse position... instead it only checks if %W is equal to $priv(window) which is a global > vars where it stores the last entered button.. in other words, on FocusOut it unsets $priv(window) so the > buttonRelease has a if %W == "" which is always false, so no $w invoke is called... > Should we do it that way (using yet another global variable) or use the %X/%Y calculation ? > > KKRT > > On Mon, Feb 19, 2007 at 08:55:52PM +1100, Arieh Schneier wrote: > > > Comments : > > > - Find a way to really have the 'buttonrelease' behavior on buttons > > > Currently, in the buttonbar of a CW, when we ButtonPress on a button but > > move the mouse outside of the > > > button before releasing it, it still activates the button, the normal > > behavior would be to cancel the click if > > > the release is done outside of the button. We should maybe do someting > > like bind <<Button1>> > > > "handle_button_release %W %X %Y [list command to execute on bind]" > > > and have the handle_button_release {w x y command } { > > > if { $x > [winfo width $w] && $y > [winfo height $w] || $x < 0 && $y < 0 } > > { return } else { uplevel eval > > > $command } > > > } > > > > That is already implemented for 'buttons' however those were changed to > > 'labels' I don't remember the exact reason why, but the comment in the code > > is: "#Buttons are now labels, to get nicer interface on Mac OS X". However > > if you want to just reuse the code from buttons and add it to 'labels' you > > could try just binding the events that you want in the label to the button > > events. Or you could copy the code and keep the bits you want. Anyway, all > > the code you want can be found in: button.tcl (...\Tcl\lib\tk8.4). > > > > Lio. > > > > > > ------------------------------------------------------------------------- > > 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 > > _______________________________________________ > > Amsn-devel mailing list > > Amsn-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/amsn-devel > > ------------------------------------------------------------------------- > 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 > _______________________________________________ > Amsn-devel mailing list > Amsn-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/amsn-devel > ------------------------------------------------------------------------- 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 _______________________________________________ Amsn-devel mailing list Amsn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amsn-devel