Monday, 23 June 2008

Improving adapters API

I was ill since middle of last week (cold or something like that). Now it’s better but perfect :(

Anyway, I did something on my project, not much though.
I stopped with improving adapters API—I need a function that would create adapter just by its type name. With previous implementation, EntityEditor used some internal functions/methods to achieve this. Unfortunately, it seems impossible to convert them to some general interface.

So, I’m added this function to API. But there other problem rises: when creating adapter, atlas message object need to be passed to constructor. Value of this message is used then to populate adapter GUI element for first time and seems nothing like that. But, this element value has to be carefully crafted and be valid for this adapter type. For example, if it is number adapter then it should have number type, if it is 2D-position than it must be list with two number sub-elements, etc.
EntityEditor contains functions for creating all these element types. It is good functions and could be useful in some cases. But in overall, I see this approach as non-scalable—it is hard to add new adapter type.
So, my proposal is to let adapters handle elements of type NONE as some kind of default value.

Also, in some small time slices I was looking into packaging ember for fedora. When doing that, I find some license issues with ember and other libs.

No comments: