Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re: Verbose Tk Code

by GrandFather (Saint)
on Mar 01, 2021 at 00:30 UTC ( #11128925=note: print w/replies, xml ) Need Help??

in reply to Verbose Tk Code

GUI code generally ends up with lots of similar looking code to manage layout tasks. Often that can be tided up with helper functions that lay out a row of controls or set up a table row or whatever the task might be. Using hashes for common parameter sets helps a lot too. Often tossing display elements into an array the running over the array to get stuff packed in the right order helps too.

At the end of the day the techniques you use to clean up repetitive Tk code are much the same as the techniques you use to clean up any repetitive code - refactor the repetitive bits, reduce, reuse, recycle.

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11128925]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (3)
As of 2021-04-11 00:12 GMT
Find Nodes?
    Voting Booth?

    No recent polls found