>----Messaggio originale---- >Da: stevena...@yahoo.com >Data: 18/06/2011 11.54 >A: "f...@libero.it"<f...@libero.it>, <scid-users@lists.sourceforge.net> >Ogg: Re: [Scid-users] New "Best tree games" window > >Haha ... after a brief look, code is pretty amazing. > >I think the switcher uses a distinct filter cache from the gamelist ? Yes, db switcher always show the result of user search (header/current board/material/pattern). Gamelist window show the result of user search too, but if you open a tree window than it will show only the results that match the current position (i. e. the same results of the best games window if you uncheck "all games"). However all the three windows can share the same sortcache (if the sort criteria are the same).
> >My system throws an error for this: >- ttk::bindMouseWheel $w.glist "glist.ybar_ $w.glist" >-> invalid command name "ttk::bindMouseWheel" >Instead i use >+ bindMouseWheel $w.glist "glist.ybar_ $w.glist" > Thanks, i forgot to catch the call. Which tk version are you using? I think that ttk:bindMouseWheel should work on Mac too. It would be nice if someone with a Mac can confirm this. >There are other minor bugs too. > >But using C++ style procedure names (eg "glist.update") is not a good idea. >Why not just use "::" ? In most everything tcl/tk (and certainly the whole of >Scid), the "." is pretty much reserved for the Tk widget hierarchy. You're >really messing badly with the given conventions imho. > Well, i suppose it's a matter of taste. Widget must start with . so i don't think glist.update can be confused with a widget. And if you download the ttk::treeview source code you will see that there are heading.press heading.drag heading.release etc... The fact is tcl has no encapsulation. Especially in scid is difficult to figure out what a function do without reading the code. Writing glist.update makes clear that glist is an object and update one of his methods. So one can assume that update will not change other glist objects or other scid parts. However, as i said, i suppose it's a matter of taste. Bye, Fulvio ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ Scid-users mailing list Scid-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scid-users