Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Verbose Tk Code

by GrandFather (Saint)
on Mar 01, 2021 at 00:30 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (4)
As of 2024-04-19 23:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found