Creation of more than one window per source could help, or the option to merge some
designerfiles, to make a one output.
No, as it will still duplicate with the constant created outside .pbf files.
As nospam said I don't think there's so much memory wasted, too!
The enumerations are listed in the order of windows, gadgets, menu items, images, fonts. I have an application with 31 windows, 633 gadgets, 23 images, 180 menus, and 6 fonts. If I add one more window with a menu, an ImageGadget and a TextGadget, with the way you have set up the enumerations would mean that I would be using resources for 874 windows 877 gadgets, 878 menus, 879 images, and 880 fonts. That's a total of 4388 PB resources instead of 878. That means you are wasting memory resources exponentially not linearly.
Fred's advice is that it is better to avoid doing this.
You have to group the enum per object type for optimal performance: ie, one enum for window, one for gadget, one for toolbar etc. Using only one enum for every object will lead to holes into the internal arrays for each objects.
You put evety different object in the same enumeration. While it does work, on a big program it can be unefficient. Better use an enum per object type (one for Menu, Gadget, Window etc.). Each PB library has it's own object range.
When windows are designed for a project and they are going to be included together I would think that you could include the separate enumerations for gadgets for instance into a single enumeration. Another way that would keep the enumerations grouped separately is to simply start each enumeration with a literal value representing the count of all the previous enumerations of the same type (i.e. Enumeration 0; Enumeration 6; Enumeration 22, etc.). If the worry is that the source code for a window won't be included as part of a group then a tool that would look over the source and make modifications may help.
Freak suggested an option using macros
but I think it would fall in the category of having to be customized also.
The link above is in a thread for a feature request for named enumerations. Fred said it was a good idea but we are still waiting since 2004
This is a situation that cries out for named enumerations.