[REBOL] Re: Patching a scheme.
From: volker:nitsch:gm:ail at: 28-Jun-2005 10:17
On 6/27/05, Hallvard Ystad <[hallvard--ystad--oops-as--no]> wrote:
> If you want to save to a file something that you will later load, I think
> (think!) you should 'save it, not 'write it.
And to load it back, do it, not load it.
it will look like
make object! [
and thats code to make an object, not an object itself.
(not tested if http works then, but with ftp)
and remember to save/header, 'do checks for that with a file.
Or don't and use [do load %http.r] later.
Btw nice trick for dumping is with compose:
save/header %http.r compose/only [
][Title: "my http"]
And then just [do %http.r]
> >> help save
> SAVE where value /header header-data /bmp /png /all
> Saves a value or a block to a file or url.
> SAVE is a native value.
> where -- Where to save it. (Type: file url binary)
> value -- Value to save. (Type: any)
> /header -- Save it with a header
> header-data -- Header block or object (Type: block object)
> /bmp -- Save in .BMP format
> /png -- Save in .PNG format
> /all -- Save in serialized format
> Dixit Bruno G. Albuquerque (18.23 27.06.2005):
> >To be able to set the Referer header in the HTTP request, I am trying to
> >patch the HTTP scheme. I did some preliminary tests and I am having
> >problems. Without changing anything in the scheme, I did this to save it
> >in a file:
> >write %http.r probe system/schemes/HTTP
> >Then, to read it back, I did:
> >system/schemes/HTTP: load %http.r
> >This results in a crash (under Windows) when trying to use the HTTP
> >protocol. Am I doing something wrong?
> >To unsubscribe from the list, just send an email to
> >lists at rebol.com with unsubscribe as the subject.
> Pr=E6tera censeo Carthaginem esse delendam
> To unsubscribe from the list, just send an email to
> lists at rebol.com with unsubscribe as the subject.
Any problem in computer science can be solved with another layer of
indirection. But that usually will create another problem.