8 Jan 22:00
Custom Tree in MusicBrowser using XML
David Hough <david <at> thepriorities.com>
2005-01-08 21:00:50 GMT
2005-01-08 21:00:50 GMT
Hi,
I've been thinking about changing how the tree in the browser is
specified. At the moment its specified using a series of objects (e.g.
MyMusicInfo, ArtistInfo, etc.) which return each other as children. There
are quite a few of these as each type of item, or single node needs its
own class written for it. Also, of course, this means the structure of the
tree is hardcoded.
What I'm thinking of doing is ditching all the different classes for each
of the items in the tree, and having one or two generic classes, with the
properties and list structure specified by XML. This would in effect mean
it would be possible for people to define their tree stucture and
contents, instead of our current one size fits all single fixed tree
structure.
This is still at an early stage, and I'm just wondering what other people
think of the idea?
I've so far hacked together an implementation that can parse the following
XML to create the "My Music" node on the tree.
I seriously doubt that this is the best way to represent the tree in XML,
anybody got any better ideas?
<node text='My Music' icon='zinf-music-library'>
<node text='All Tracks' icon='zinf-all-tracks'>
<list url='zinf://url?type=F'>
<template url='@@url@@' input='url' icon='zinf-track' />
</list>
</node>
(Continue reading)
RSS Feed