How do you cycle through items in a Relationship?
<p>This is the current code:</p>

<pre><code>Class %Utcov.Test Extends %RegisteredObject
{

ClassMethod listClasses(ns As %String, projectName As %String)
{
    // Switch namespaces to the new one
    new $namespace
    set $namespace = ns

    // Grab our project, by name; fail otherwise
    // TODO: failing is CRUDE at this point...
    #dim project as %Studio.Project
    #dim status as %Status

    // TODO: note sure what the "concurrency" parameter is; leave the default
    // which is -1
    set project = ##class(%Studio.Project).%OpenId(projectName, /* default */, .status)

    if ('status) {
        write "Argh; failed to load", !
        halt // meh... Ugly, f*ing ugly
    }

    w project.Items
}

ClassMethod main()
{
    do ..listClasses("USER", "cache-tort-git")
}

}
</code></pre>

<p>First things first: I know that the code sucks... But that's the learning curve, I will eventually do better... The problem I want to solve here is this line:</p>

<pre><code>w project.Items
</code></pre>

<p>At the console, it currently prints:</p>

<pre><code>2@%Library.RelationshiptObject
</code></pre>

<p>but what I'd like to do is of course to cycle through these objects, which, according to the documentation, are "instances" of <a href="http://docs.intersystems.com/latest/csp/documatic/%25CSP.Documatic.cls?PAGE=CLASS&amp;LIBRARY=%25SYS&amp;CLASSNAME=%25Studio.ProjectItem" rel="nofollow">%Studio.ProjectItem</a>.</p>

<p>How do I cycle through these? <code>WRITE</code> doesn't cut it, and in fact I surmised from the start that it would not... I just cannot figure out how this is done in ObjectScript :/</p>