Hi,
I've seen that there is a naming convention for the widgets of perl tk: Unsolicited Advice (Mastering Perl Tk).
But is there also a naming convention for hierarchical widgets? For example I have a notebook widget with several tabs. And in a tab I use a frame and in this frame is another frame and then there is a button. If I just name this button "blah_b" for example it is not enough because I could have a button with the same purpose in another frame. So I would like to give it a name which signals that it is inside this tab, frame, ...
My idea was to do this with a prefix. Another idea would be to do this with a hash which represents the hierarchial structure of the GUI.
So the name would represent the hierarchial structure of the GUI. But if I want to move this button from one place to another then I would have to change the name.
So I'm very interested how you handle this problem. At the moment I have no prefix or hash used to name the widgets. But now I really get confused when I'm creating a bigger GUI with perl tk.
Thank you
Dirk
In reply to Perl Tk Naming Convention by Dirk80
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |