Make sure all the objects have meaningful names instead of the default ones (like dw_1, cb_1).
PB helps us with that automatic naming, but sometimes developers forget to rename new objects to something more self-explanatory (like dw_order_header, cb_add_order_line).
If your specific window is inherited from an ancestor having its own objects under universal, but ugly names like dw_1, you physically cannot change these names in the descendant. But there is another simply solution to keep the scripts nice - for example, the next two steps let you get rid of the name dw_1 in your scripts:
In the descendant window, declare an instance variable of DataWindow type (or a type, used in your framework as the base DW class) and with a meaningful name (for example, idw_students).
In the Open event, make that variable pointing to the DW:
- Code: Select all
idw_students = dw_1
From this moment on, only idw_students must be used in the scripts - forget about dw_1!
- Site Admin
- Posts: 111
- Joined: 19 Feb 2013, 20:33
Return to Elegant Code
Who is online
Users browsing this forum: No registered users and 1 guest