Menu

#15 Refactor TableDisplay()

open
tktable (13)
5
2005-01-07
2005-01-07
No

The _huge_ TableDisplay() function is refactored so
that logical functions are in seperate static functions
(e.g., TableDisplayEmbWindow(),
TableDisplayDrawBorder(), etc.). These functions are
only called once and only from TableDisplay() but by
moving these (often long) blocks of code out, it is
easier to see the flow of TableDisplay() and the blocks
are more loosely (and more explicitly) coupled. No
more goto!

This change adds NO functionality, it should result in
absolutely no differences in behavior. (It will,
however, form the basis for me trying to add smooth
scrolling to tkTable.)

Discussion

  • Christopher Nelson

    Logged In: YES
    user_id=107514

    An 1,800-line diff to a 4,000 line file seemed a bit
    unwieldy; here's the revised file whole.

     
  • Christopher Nelson

    Logged In: YES
    user_id=107514

    Oh, and I added ~100 lines of comments.

     
  • Christopher Nelson

    Logged In: YES
    user_id=107514

    Cleaned up diff.

     
  • Christopher Nelson

    Removed some noice from refactored file before diffing.

     
  • Christopher Nelson

    Whole refactored file

     
  • Christopher Nelson

    Logged In: YES
    user_id=107514

    This suffers from the same problem that my smooth scrolling
    patch does: selection isn't displayed when table is
    disabled. I'm working on it....

     
  • Christopher Nelson

    Logged In: YES
    user_id=107514

    I fixed the selection tag problem in the smooth scrolling
    patch. I'm not planning to port it over here.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.