Hi all,
 some clarifications from my side:

Quote 1:

One of the last developers to work on the old code-generation framework commented that it was "very painful". Not sure whether this comment was about the basic concept of this approach, or just the implementation.


It was about changes made to code within generation marks in Tomahawk Core components. To make the old generator work again, it had to be extended to take in account: a) modifications in either getter or setter (or both), which comprises of custom added behavior (overriding other properties, additional checks) b) modifications in save/restoreState methods (overriding several properties based on checks) c) missing attributes everywhere - xml, tld, tag, component (basicly everywhere it could be)

I think items a) and b) aren't addressed in current Trinidad's generation.


Quote 2:

A question was raised about why state isn't retrieved from the attributes map - this cannot be used, however, cause it would use reflection internally and call the getter of the method, if a value is not directly stored in the attributes map. As soon as the getter is called, after the check for the local value returns null, you will get back the value from a value-expression, and you do not want to save this value in the state, as the value-expression itself is already stored!


- saveState/restoreState for components derived from API's base already saves/restores the whole Map, so no need to do it again in derived classes -> no additional reflection (which should never be done in the first place). - if a value isn't in attribute map it means it's not a crucial value to restore state, is it? (mind that all value bindings and listeners are saved/restored by API's base too)

Regards,
 Zdenek

Reply via email to