That type of implementation will render the whole binding mechanism of MCML useless. I don't think that would be a good idea. MCML is wacked enough as it is.
What information are you trying to add? Why does it need to be dynamic?
The biggest issue with adding properties to Item (or any persistent data) Is that it invalidates the cache. The part that needs to be dynamic is the serialization but I'm not familiar enough with that implementation to tell how hard it will be to make it survive new persistent data without blowing the cache. We have been waiting on a few new attributes people would like to see because of this issue.
--
You received this message because you are subscribed to the Google Groups
"VideoBrowser Devs" group.
To post to this group, send email to videobro...@googlegroups.com.
To unsubscribe from this group, send email to
videobrowser-d...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/videobrowser-devs?hl=en.
No virus
found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.733 / Virus Database: 271.1.1/2647 - Release Date: 01/29/10
14:35:00
LOL.
I'm pretty sure item is persisted - at least the metadata parts of it which is what you are talking about - more metadata. Of course, if you wanted to add this stuff and NOT persist it then it wouldn't affect the cache. You could add a dynamic field like you suggest and not persist it but that means you would have to load it from the source every time and that seems like a pain when we have this nice persistence model.
There's a couple bits I'd like to see added at the metadata level so I could be convinced to bite the invalid cache bullet for Thunderblade. We'd just want to add a line to the installer that blows the old cache away so we are sure we re-build it properly. Not sure how Sam and Jas feel about this, though.
You can invoke a method that returns a result from MCML and you can pass it parameters. However, you would have to take care of managing the display yourself because you couldn't use binding. It could be done but might be ugly and who knows how it will perform and each theme will have to be coded properly to support it.
Any way you could accomplish what you want with specialized baseitems and overrides of already existing properties (like summary)...?
Version: 9.0.733 / Virus Database: 271.1.1/2647 - Release Date: 01/30/10 02:35:00
You already have a sub-classed baseitem for "song" don't you? You simply need to hang your specialized type off of the chain where ever it makes sense. "Album" and "Artist" would be derivatives of "Folder" I would imagine. But, of course, the problem is that there is no way for anything else (other than your plugin) to know about these types... Hence the interface you are talking about, I guess.
I don't think this is necessarily a horrible implementation, though, because themes need to account for this specialized information in their layout anyway. Rob already does this with Vanilla doesn't he?
What if we defined a single, extensible field on baseitem like you suggested and then an interface to add fields and values and retrieve values. Then, this field would be "known" to the whole of MB and could then be interacted with by the core, any theme, or any other plug-in...
This field could be a simple dictionary keyed by a string with a specialized class that defines the type and value (and whatever else needs to be there) as the member.
Of course this creates the cache issue but I think we could deal with that.