[prev in list] [next in list] [prev in thread] [next in thread]
List: mozilla-rdf
Subject: Re: simple seq browser?
From: "rvj" <md () rolemodels ! net>
Date: 2003-07-15 6:49:25
[Download RAW message or body]
OK the penny has finally dropped.
I was assuming that I HAD to use the enumerator
"rvj" <md@rolemodels.net> wrote in message
news:bem67b$1ph4@ripley.netscape.com...
> ps Apart from the usual typos in my initial post,
>
> it appears there is no getPrevious() method allowing forward & backward
> browsing
> within a SEQ container.
>
> It seems that its a simple enumerator only supporting getNext() so it
> appears I additionally
> need to create a temporary array of resource ids?
>
>
>
>
>
> "rvj" <md@rolemodels.net> wrote in message
> news:belvrm$1ko2@ripley.netscape.com...
> > What I would like to be able to do is create a simple browser
> >
> > a) create a container for a seq/root
> >
> > var seq = RDFC.MakeSeq(ds, RDF.GetResource("urn:roster"));
> > var nodes = RDFC.GetElements();
> >
> > b) jump to a specific resource in the container
> >
> > // find resource in nodes seq (arcsin?)
> >
> > c) allow getnext() / getprevious() to browse form that point
> >
> > if (forward=true)
> > var resource =
> >
>
nodes.getNext().QueryInterface(Components.interfaces.nsIRDFResource).Value;
> > else
> > var resource =
> >
>
nodes.getPrevious().QueryInterface(Components.interfaces.nsIRDFResource).Val
> > ue;
> >
> > Should this approach work?
> >
> >
> >
> >
>
>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic