Hi Anton,

it's really worth your while to explore the system. Just start at the
top-level system object:

>> print mold next first system

look through the list it generates, check the types of the different
words contained in the block

>> foreach word next first system [
  print [word "has type" type? in system word]
]

and then look at what the words that are objects contain. Or, if you're
too lazy to do that manually ;-), you can use Bo's system object
inspector, which should in rebol.com's archive. It's an interactive tool
that lets you explore the system object to a degree.

Hope this helps,

Elan

Anton wrote:
> 
> Allen, Elan, Nenad,
> 
> > Hi Anton, Elan, Nenad,
> >
> > That particular parse-url is in the system/view/vid object.
> > read-via is also
> > in the same object. (it is not the same as the one in net-utils, though it
> > does call that one)
> 
> How did you discover this?
> Did you know 'parse-url already or did you have to search?
> How would you go about searching for a word
> whose value is defined in some other context?
> Is there a way of determining which
> context a word's value is defined in?
> Is there a way of listing all contexts?
> 
> Anton.
> 
> > >> f: get in system/view/vid 'parse-url
> > >> source f
> > f: func [url /local purl][
> >     net-utils/url-parser/parse-url
> >     purl: context [user: pass: host: port-id: path: target: none] url
> >     if all [purl/target purl/host] [purl]
> > ]
> >
> > To explore Vid a bit more you can print it to a file.
> >
> > echo %vid.txt
> > probe system/view/vid
> > echo none
> >
> > ;Happy reading!
> >
> > Cheers,
> >
> > Allen K
> 
> > ----- Original Message -----
> > From: "Anton" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, January 31, 2001 1:33 AM
> > Subject: [REBOL] 'parse-url - where defined?
> >
> >
> > > Hi,
> > >
> > > Looking at
> > > source read-via
> > >
> > > It uses 'parse-url in the second line of read-via's function body.
> > > Where does parse-url come from?
> > > On the console, parse-url has no value.
> > > How then, does read-via work?
> > >
> > > my system/version == 0.10.38.3.1
> > >
> > > >> parse-url
> > > ** Script Error: parse-url has no value.
> > > ** Where: parse-url
> > >
> > > >> source read-via
> > > read-via: func [
> > >     {Read a file via the cache. Returns binary. Failure returns error.}
> > >     url [url! file!]
> > >     /progress callfunc port-hand
> > >     /update "Force update from source site"
> > >     /local path file data purl loc-path
> > > ][
> > >     if file? url [return read url]
> > >     if none? purl: parse-url url [return none]
> > >     loc-path: rejoin [system/options/home/public "/" purl/host "/" any
> > > [purl/path ""]]
> > >     file: join loc-path purl/target
> > >     path: rejoin ["/" any [purl/path ""] purl/target]
> > >     either all [not update exists? file] [data: read/binary file] [
> > >         data: either progress [read-net/progress url :callfunc
> > port-hand]
> > > [read-net url]
> > >         if data [
> > >             if not exists? loc-path [make-dir/deep loc-path]
> > >             write/binary file data
> > >         ]
> > >     ]
> > >     data
> > > ]
> > >
> > > Anton.
> 
> --
> To unsubscribe from this list, please send an email to
> [EMAIL PROTECTED] with "unsubscribe" in the
> subject, without the quotes.
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to