@t0neg0d said:
How do you manage the mapping though? In the DTD? And how large does this file become (i.e. how hard is it to maintain as your attribute list grows)?
EDIT: It’s a lot easier to take a look at changing this now that it is completely working. Before… the thought was kinda scary, because I wasn’t completely sure how to accomplish half of it.
EDIT @: I say completely working. I’ve tested all components and a large number of methods. Though, I’m fairly sure I haven’t accounted for some parameter data types. I also have an issue with getting audio nodes to fire off properly via the effect definitions
Last time I looked at spring, it wires most of it up automatically based on reflection. I think you can plug in specific handlers for the cases it doesn’t understand well but I don’t remember. It’s been nearly a decade or something since I last looked.
@pspeed said:
Last time I looked at spring, it wires most of it up automatically based on reflection. I think you can plug in specific handlers for the cases it doesn't understand well but I don't remember. It's been nearly a decade or something since I last looked.
When you say “wires it up” d you mean it uses the parameter names? That would be insanely cool if so.
@t0neg0d said:
When you say "wires it up" d you mean it uses the parameter names? That would be insanely cool if so.
It uses the property names, as I recall. It deals with objects and properties… not multi-parameter method calls. But if you have a setter “foo” that takes an object “bar” and bar has various properties then basically you can do things like: (again using params because our forum isn’t for coders)
[java]
(MyObject title=“Something”)
(foo someProperty=“1” someOtherProperty=“2”)
(/MyObject)
[/java]
Which basically equates to the following if coded long-hand:
[java]
MyObject o = new MyObject();
o.setText( “Something” );
Bar b = new Bar();
b.setSomeProperty(“1”);
b.setSomeProperty(“2”);
o.setFoo( b );
[/java]