ragamer
March 14th, 2010, 14:27
My problem is simple. I have a window layout I want to repeat multiple times in the same part of my sheet with slight alterations (in labels, etc).
As the behaviour of the window itself is heavily based on scripts I want to avoid having to declare multiple times similar window classes, on top of having to recreate the controls.
The way I want the windows arranged make it a bit hard to create a parent windolist and then consider each of the similar window as an item on the list.
So my "investigation" options are:
1) Use the prefered "windowclass template" approach, were I declare each window as a subwindow with the same windowclass and then try to "tweak" each instance. My 1st attempts have collided with the apparent impossibility to "transfer" custom fields from the parent window on each XML subwindow declaration so each instance of the class can be tweaked using the same code (things as labels and datasources, for example).
2) Repeat manually EACH windowclass definition altering slightly the controls and making ALL of them sharing the same scriptfile. Obviously a nightmare when tweaking "common" controls later as ALL changes need to be manually spread over the entire set.
3) Transform the concept of that part of the sheet from multiple disperse windows definitions to a single windowlist with each of the original window as a member of the list. This will mean that the physical possitions of each of the elements will be very restricted but it could be possible with a combination of noscroll and columns tags and some internal hardcoded size tables so each element can resize itself (Of course creation of new windows should be disabled at the top level). I have seen how 3E ruleset manages the skill sheet in multicolumn and they manage some nice effects... But before trying something similar, I want to be sure there is no other more "straight" approach.
Any experienced coder around that can share his/her experiences when dealing with the apparent impossibility to define true window templates?
As the behaviour of the window itself is heavily based on scripts I want to avoid having to declare multiple times similar window classes, on top of having to recreate the controls.
The way I want the windows arranged make it a bit hard to create a parent windolist and then consider each of the similar window as an item on the list.
So my "investigation" options are:
1) Use the prefered "windowclass template" approach, were I declare each window as a subwindow with the same windowclass and then try to "tweak" each instance. My 1st attempts have collided with the apparent impossibility to "transfer" custom fields from the parent window on each XML subwindow declaration so each instance of the class can be tweaked using the same code (things as labels and datasources, for example).
2) Repeat manually EACH windowclass definition altering slightly the controls and making ALL of them sharing the same scriptfile. Obviously a nightmare when tweaking "common" controls later as ALL changes need to be manually spread over the entire set.
3) Transform the concept of that part of the sheet from multiple disperse windows definitions to a single windowlist with each of the original window as a member of the list. This will mean that the physical possitions of each of the elements will be very restricted but it could be possible with a combination of noscroll and columns tags and some internal hardcoded size tables so each element can resize itself (Of course creation of new windows should be disabled at the top level). I have seen how 3E ruleset manages the skill sheet in multicolumn and they manage some nice effects... But before trying something similar, I want to be sure there is no other more "straight" approach.
Any experienced coder around that can share his/her experiences when dealing with the apparent impossibility to define true window templates?