Hey Ron,
Yes, I'm pretty sure I'm talking about something similar to the Prefab system you described, with the exception that I'd not have 'Prefab Instances' (yet); I'd just have the prefab data hierarchy.
"I just want to make sure that what you want is inheritable properties on individual objects rather than inheritable properties on types of objects." Confuses me a little? Are you wondering if I want to setup a type inheritance chain where I override the default value that would be constructed? I.e.:
Class Bar { float Health = 100.0f; }
Class Foo : Bar { float Heath = 200.0f; } // just kidding, redefine defaults when using this class
Because no, that's crazy and insane, and not very practical for designers / artists. :)
Yes, I would end up utilizing DOM for the points you made, because I don't want to deal with writing all that code.
Question, which relates to my other question (about WPF wrappers), how would you go about integrating both of these adapters? In this case, I'd want the WPF adapter to wrap around the InheritableDomNode adapter (which wraps around the DomNode). (I'd really like to code gen each property to go through inheritance.) I have the naive instinct to make them the same adapter, but feel like isn't really a good idea.
For the classes, I'm talking about:
// code genned from Julianne's awesome property work?
class FooWPF : ObservableDomNodeAdapter, INotifyPropertyChanged
{
[ObservableDomProperty("name")]
public string Name { get { return GetAttribute<string>(schema.namedType.nameAttribute); } set { DomNode.SetAttribute(schema.namedType.nameAttribute, value); } }}
using InheritableProperty;
// lets say I code genned this.
class FooInheritable : DomNodeAdapter
{
InheritableProperty m_name;
public Name
{
get { m_name.GetValue(DomNode); }
}
}
And in my control, I'd just want to bind against SomeFooWithABase.Name; and whenever the base changes, I also get that update in the UI.
Basically, I want a containment pattern like this: FooWPF contains and exposes FooInheritable, FooInheritable contains and exposes DomNode.
Maybe I'm making things too complicated? :(