by Degeim » Tue Jul 31, 2012 5:24 pm
Thanks, but I'd actually tried that, but without any luck. Here's what I've got so far:
- Code: Select all
//This is supposed to fetch the node for albums in Collection 1, right?
var node = _controller.SDBA.MainTree.get_Node_Album_InCollection(1);
if (node.HasChildren) // Just checking ...
{
// Getting the first child node, which I guess should be an album node.
var curr = _controller.SDBA.MainTree.get_FirstChildNode(node);
while (curr != null)
{
//Fetch the album from the database using the RelatedObjectID.
yield return GetAlbum(curr.RelatedObjectID);
//Continue with the next sibling node, which I guess is the next album.
curr = _controller.SDBA.MainTree.get_NextSiblingNode(curr);
}
}
Unfortunately, this is what I get as output from get_Node_Album_InCollection(1):

(And yes, I know that a collection with ID=1 exists, I've gotten it by enumerating SDBA.Collections.)
As you can see, every value of the variable "node" is null or false, except "HasChildren", which is true. When I try to get the first children node of "node", I get a node exactly like the image, but with "Unknown" instead of "Album".
Any ideas?
Thanks, but I'd actually tried that, but without any luck. Here's what I've got so far:
[code] //This is supposed to fetch the node for albums in Collection 1, right?
var node = _controller.SDBA.MainTree.get_Node_Album_InCollection(1);
if (node.HasChildren) // Just checking ...
{
// Getting the first child node, which I guess should be an album node.
var curr = _controller.SDBA.MainTree.get_FirstChildNode(node);
while (curr != null)
{
//Fetch the album from the database using the RelatedObjectID.
yield return GetAlbum(curr.RelatedObjectID);
//Continue with the next sibling node, which I guess is the next album.
curr = _controller.SDBA.MainTree.get_NextSiblingNode(curr);
}
}[/code]
Unfortunately, this is what I get as output from get_Node_Album_InCollection(1): [img]https://dl.dropbox.com/u/1545094/albums.png[/img] (And yes, I know that a collection with ID=1 exists, I've gotten it by enumerating SDBA.Collections.)
As you can see, every value of the variable "node" is null or false, except "HasChildren", which is true. When I try to get the first children node of "node", I get a node exactly like the image, but with "Unknown" instead of "Album".
Any ideas?