• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

AltME groups: search

Help · search scripts · search articles · search mailing list

results summary

worldhits
r4wp56
r3wp836
total:892

results window for this page: [start: 201 end: 300]

world-name: r3wp

Group: Ann-Reply ... Reply to Announce group [web-public]
Graham:
11-Jun-2005
>> probe system/standard/face/font
make object! [
    name: "arial"
    style: none
    size: 12
    color: 0.0.0
    offset: 2x2
    space: 0x0
    align: 'center
    valign: 'center
    shadow: none
]
Group: RAMBO ... The REBOL bug and enhancement database [web-public]
sqlab:
1-Dec-2006
I have a slightly modified help, that does not evaluate functions 
in objects and ports and that also dumps ports like objects.
>> a: open http://www.rebol.com
connecting to: www.rebol.com
>> help a
A is a port of value:
   scheme          word!     HTTP
   host            string!   "www.rebol.com"
   port-id         integer!  80
   user            none!     none
   pass            none!     none
   target          none!     none
   path            none!     none
   proxy           object!   [host port-id user pass type bypass]
   access          none!     none
   allow           none!     none
   buffer-size     none!     none
   limit           none!     none

   handler         object!   [port-flags open-check close-check write-check 
   ini...
   status          word!     file
   size            integer!  0
   date            date!     6-Nov-2006/21:26:44
   url             string!   "http://www.rebol.com/"

   sub-port        port!     make port! [ scheme: 'tcp host: "www.rebol.com" 
   po...
   locals          object!   [list headers querying]

   state           object!   [flags misc tail num with custom index 
   func fpos i...
   timeout         integer!  30
   local-ip        none!     none
   local-service   none!     none
   remote-service  none!     none
   last-remote-service none! none
   direction       none!     none
   key             none!     none
   strength        none!     none
   algorithm       none!     none
   block-chaining  none!     none
   init-vector     none!     none
   padding         none!     none
   async-modes     none!     none
   remote-ip       none!     none
   local-port      none!     none
   remote-port     none!     none
   backlog         none!     none
   device          none!     none
   speed           none!     none
   data-bits       none!     none
   parity          none!     none
   stop-bits       none!     none
   rts-cts         logic!    true
   user-data       none!     none
   awake           none!     none

Is there interest in including in the new release?
Dockimbel:
30-May-2007
>> probe info? %script.r/
make object! [
    size: 3405
    date: 12-Sep-2000/21:40:20+2:00
    type: 'file
]

>> read %script.r/
** Access Error: Cannot open /C/Dev/REBOL/script.r/
** Near: read %script.r/

Shoudn't INFO? return none (or an error) in this case ?
Oldes:
10-Jun-2007
There is a bug in decode-url:
>> probe decode-url http://test/path/target?text/something
make object! [
    user: none
    pass: none
    host: "test"
    port-id: none
    path: "path/target?text/"
    target: "something"
]

the target should be: target?text/something
Group: Core ... Discuss core issues [web-public]
BrianH:
30-Oct-2005
At this point, I can't imagine what the path action! would be good 
for. Perhaps it is part of the object! internals?
Volker:
30-Oct-2005
Cant have a use, else i had heard of it :) Practical use: it blocks 
mold. Recursive data, Code-obfuscation?
!> a: context[b: 1 c: 2]  path a 'b  ?? a
a: make object! [
    b: end
    c: 2
]
BrianH:
5-Nov-2005
(Back to slicing briefly) REBOL already has functionality equivalent 
to slicing as copy-of-subsection, so this would be better represented 
as a very simple mezzanine function that does the work. If you mean 
slicing as reference-to-subsection-in-place, that would be worth 
adding new support for. Something like:

slice!: make object! [start: end: none]

slice: func [[catch] s [series!] /from b [integer!] /to e [integer!] 
/len l [integer!]] [
    b: either from [at :s b] [:s]
    e: case [
        to at :s e
        len skip :b l
        true tail :s
    ]
    if greater? index? :b index? :e [to: :e e: :b b: :to]
    make slice! [start: b end: e]
]
Geomol:
10-Nov-2005
If I have an object with a function:
o: make object! [f: func [] [print "Hello World!"]]

Is there a shorter/faster way to get the function without evaluating 
it than:
get in o 'f
?
Henrik:
6-Dec-2005
>> o: make object! [time: does [now]]
>> third o
== [time: func [][now]]
>> reduce third o
== [7-Dec-2005/3:23:23+1:00]
>> third o
== [time: 7-Dec-2005/3:23:23+1:00]

>> o: make object! [time: does [now]]
>> third o
== [time: func [][now]]
>> reduce copy/deep third o
== [7-Dec-2005/3:25+1:00]
>> third o
== [time: 7-Dec-2005/3:25+1:00]

Why is the block not copied?
Henrik:
7-Dec-2005
I'm actually looking for a way to get input data as a block:

[a: 1 b: 2 c: 3]

made into an object which is:

make object! [a: b: none c: does [something to make the c value]]

so I would get an object like this:

make object! [a: 1 b: 2 c: <return value from object function>]
MichaelB:
14-Dec-2005
Was it always like that, that make object! 'block didn't copy the 
block before and that one get's the real block used for creation 
also via third 'object ? I was a little bit surprised to be able 
to change the binding of the words in an object after creation - 
I thought this is not possible with objects - now if we only could 
extend objects ...
MichaelB:
15-Dec-2005
I hope a more correct version of only 'bind-only - just to have not 
something too wrong lurcking around

bind-only: func [

    {Binds only selected words to a context. If taken 'lit'erally even 
    just words of the same kind.} 
    words [block!]
    known-word [any-word! object! port!]
    only-words [block! any-word!]
    /lit
    /local pos rule item
][
    if any-word? only-words [only-words: reduce [only-words]]
    if any-word? known-word [known-word: bind? known-word]
    unless lit [
        only-words: copy only-words 

        forall only-words [change only-words to word! only-words/1]
    ]
	
      parse words rule: [
		any [
			pos:
			set item any-word! (
				if any [
                    				find only-words to word! :item
                    				all [lit find only-words :item]
                			][
					item: bind :item known-word
					change pos :item
				]
			) | into rule | skip
		]
	]
    words
]
JaimeVargas:
6-Jan-2006
make-instance: func [
	class [object!]
	/local class-vars instance-data class-methods v
][
	class-vars: copy [*-private-*]
	class-methods: copy []
	instance-data: copy []
	foreach w next first class [
		either function! = type? v: get in class :w [
			append class-methods compose/deep [
				(to set-word! :w) func [(first :v)] [
					bind second get in (:class) (to lit-word! :w) '*-private-*
					do reduce [get in (:class) (to lit-word! :w) (first :v)]
				]
			]
		][	
			append class-vars :w
			append instance-data reduce [to set-word! :w :v]
		]
	]
	use class-vars compose/deep  [
		(instance-data)
		context [(class-methods)]
	]
]
JaimeVargas:
6-Jan-2006
make-instance: closure [
	class [object!]
	/local class-vars instance-data class-methods v
][
	class-vars: copy [*-private-*]
	class-methods: copy []
	instance-data: copy []
	foreach w next first class [
		either function! = type? v: get in class :w [
			append class-methods compose/deep [
				(to set-word! :w) func [(first :v)] [
					bind second get in class (to lit-word! :w) '*-private-*
					do reduce [get in class (to lit-word! :w) (first :v)]
				]
			]
		][	
			append class-vars :w
			append instance-data reduce [to set-word! :w :v]
		]
	]
	use class-vars compose/deep  [
		(instance-data)
		context [(class-methods)]
	]
]
Henrik:
7-Jan-2006
ah the joys of BIND...

>> a: make object! [b: 0 c: b]
>> a/b
== 0
>> a/c
== 0
>> set in a 'b 7
== 7
>> a/c
== 0

How do I restore the context?
Luca:
22-Jan-2006
I need to "filter" the content of an object. Any better idea on how 
to do it other the this one:
obj: make object! [
	bb: 1
	cc: 4
	dd: 7
]


block: [bb dd]

filter: func [obj block /local newobj][
	newobj: make object! []
	foreach [s v] third obj [
		if find block to-word s [
			newobj: make newobj reduce [
				s v
			]	
		]
	]
	newobj
]

probe filter obj block

Result:

make object! [
    bb: 1
    dd: 7
]
Gregg:
22-Jan-2006
Here's something I did that may work for you:

obj-spec: func [
    "Returns the object spec as a single line (flat) string."
    obj [object!]
    /only "no surrounding brackets"
    /mold "Multi-line MOLDed format"
    /local res
][
    res: copy find/tail system/words/mold obj "make object! "
    if not mold [trim/lines res]
    if only [res: trim/auto next head remove back tail next res]
    res
]

remove-words: func [

    "Returns a copy of the object with the specified words removed."
    object [object!]
    words  [word! block!] "The word, or words, to remove"
    /local spec
][
    spec: load obj-spec object
    foreach word compose [(words)] [
        remove/part find spec to set-word! word 2
    ]
    make object! spec
]


The reason it doesn't use THIRD on the object is because of how words 
are returned. I use OBJ-SPEC to save object spec blocks to disk for 
the same reason.
Henrik:
22-Jan-2006
if the solution gregg posts is better, use that, but:

a: make object! [
  bb: 1
  cc: 4
  dd: 7
]

block: [bb dd]


make object! foreach word difference first a block [head remove remove 
find third a to-set-word word]
Henrik:
22-Jan-2006
d: third a

make object! foreach word next difference first a block [head remove 
remove find d to-set-word word]

seems to work
Luca:
22-Jan-2006
Gregg: Thank you, you are right, I forgot the 'THIRD problem. In 
other scripts I used the following solution to bypass it.

'prefs is an object containing various data types.
'rp2pcprefs is the file to save it to

save-prefs: func [/local prefstmp][
	prefstmp: copy/deep [] 
	foreach w next first prefs [
		append prefstmp reduce [to-word w get in prefs to-word w]
	]
	save rp2pcprefs prefstmp
]

load-prefs: func [/local prefstmp][
	prefstmp: make object! [] 
	if exists? rp2pcprefs [
		foreach [w v] load rp2pcprefs [

   prefstmp: make prefstmp reduce [to-set-word w ""] set in prefstmp 
   to-word w v
		]
	]
	prefstmp
]


Henrik: 'difference is a good point I didn't think to, then I like 
the one-liner :), thank you.
Gabriele:
23-Jan-2006
extract-object:
    func [source [object!] dest-template [block! object!]]

    [   if block? dest-template [dest-template: context dest-template]
        foreach word next first dest-template

        [   set in dest-template word get any [in source word 'none]]
        dest-template
    ]
Gabriele:
23-Jan-2006
>> obj: make object! [
[     bb: 1
[     cc: 4
[     dd: 7
[    ]
>> probe extract-object obj [bb: dd: none]
make object! [
    bb: 1
    dd: 7
]
Volker:
23-Jan-2006
!>>obj: context[bb: 1 cc: 4 dd: 7]
!>>probe context intersect/skip third obj [bb: - cc: -] 2   
make object! [
    bb: 1
    cc: 4
]
Allen:
24-Jan-2006
To illustrate for those who may not know what the issue is with third 
/ make

>> c: make object! [a: 'print b: "hi"]
>> ? c
C is an object of value:
   a               word!     print
   b               string!   "hi"

>> spec: third c
== [a: print b: "hi"]

;Using make object! fails
>> e: make object! spec
hi
** Script Error: a needs a value
** Near: a: print b: "hi"

;Contruct works
>> f: construct spec
>> ? f
F is an object of value:
   a               word!     print
   b               string!   "hi"
Henrik:
29-Jan-2006
hmm... I can't seem to figure this out:

>> w: copy reduce [make object! [test: 27]]
>> set [y] w
== [make object! [
        test: 27
    ]]
>> probe y
make object! [
    test: 27
]


This part is ok. Now I want to add new keys to the object. How do 
I do that while keeping the reference to the W block?

I can set existing keys:

>> set in y 'test 35
>> w
== [make object! [
        test: 35
    ]]

>> set in y 'test2 127

** Script Error: set expected word argument of type: any-word block 
object
** Near: set in y 'test2 127

Can't do that.

>> set y make y [test2: 127]

Then I lose the reference to the W block.


Y is a point I use in a large object which I traverse. It contains 
smaller objects and these smaller objects must sometimes be updated. 
The position is remembered with Y. I want to MAKE objects there without 
losing the reference to W.
Anton:
29-Jan-2006
Maybe you meant:    w: reduce copy [make object! [test: 27]]
Volker:
29-Jan-2006
!>>obj: reduce[context[a: 1]]
== [make object! [
        a: 1
    ]]
!>>obj/1: make obj/1[b: 2]
!>>probe obj/1
make object! [
    a: 1
    b: 2
]
Group: View ... discuss view related issues [web-public]
Ashley:
13-Feb-2005
Q. On Windows you can define a func as:

maximize-face: func [
	"Maximizes a face on screen."
	obj [object!]
][
	obj/changes: [maximize]
	obj
]

which lets you do:

	view maximize-face layout [text "Hello world!"]


but this is of limited use when you want to know how big the [maximized] 
screen will be *prior* to layout.

	help system/view/screen-face/size

isn't quite what we want, so I cobbled up the following:

max-win-size?: has [scr-face view-face] [
	scr-face: system/view/screen-face
	view-face: make face []
	view-face/changes: [maximize]
	;	view the face
	insert tail scr-face/pane view-face
	show scr-face
	wait .001
	;	unview the face
	remove back tail scr-face/pane
	show scr-face
	view-face/size
]

which has two drawbacks:

1) It requires the face to be shown (screen flickers briefly)
2) It doesn't work on Linux

Anyone else mucked around with this sort of stuff?
shadwolf:
22-Feb-2005
>> source show-popup

show-popup: func [face [object!] /window window-face [object!] /away][
    if find pop-list face [exit]
    window: either window [window-face] [
        if none? face/options [face/options: copy []]
        if not find face/options 'parent [
            append face/options compose [parent (none)]]
        system/view/screen-face]
    face/action: away
    insert pop-list pop-face: face
    append window/pane face
    show window]
Ashley:
27-Feb-2005
A question for those who have delved into View facets; which facets 
(apart from 'data) are *not* used by View? 'action seems to be reserved 
for the VID feel system, 'span seems to have an undefined effect 
if used. The complete list is:

	type: 'face
	offset: 0x0
	size: 100x100
	span: none
	pane: none
	text: none
	color: 200.200.200
	image: none
	effect: none
	data: none

 edge: make object! [color: 200.200.200 image: none effect: none size: 
 2x2]

 font: make object! [name: "arial" style: none size: 12 color: 0.0.0 
 offset: 2x2 space: 0x0 align: 'center valign: 'center shadow: none]

 para: make object! [origin: 2x2 margin: 2x2 indent: 0x0 tabs: 40 
 wrap?: true scroll: 0x0]

 feel: make object! [redraw: none detect: none over: none engage: 
 none]
	saved-area: none
	rate: none
	show?: true
	options: none
	parent-face: none
	old-offset: none
	old-size: none
	line-list: none
	changes: none
	face-flags: 0
	action: none


I'm trying to determine which facets I can safely use when not using 
VID.
Group: I'm new ... Ask any question, and a helpful person will try to answer. [web-public]
Gabriele:
4-Aug-2007
what you say instead is that some values do not have a mold representation, 
so that they mold to something that once evaluated, returns the value 
(eg make object! ... and so on).
RobertS:
5-Aug-2007
it's my 'Liquid Rebol' joke; it belongs in chat.  New people always 
post in the wrong threads.  Better "I'm new" than "They're new" or 
"We're new"
	joke = new Rebol(2)  // javascript

 funnier: make classInstance! RebolObject [prototype! classObject! 
 object! ]
RobertS:
5-Aug-2007
;; this is neat

 mold make object! ["test"]   ;; warning: to preserve a spec block 
 be sure to use    obj: make object! copy/deep specBlk

;; copy/deep issues are rampant in Smalltalk ( if you get the impression 
that I think Smalltalkers neglect Rebol, yer rite )
RobertS:
13-Sep-2007
Once there are only subblocks it becomes trivial;  I have been trying 
to augment a path! series which starts with a block in which a tagged-word 
is bound to a block .  By augment the path I mean to return a path, 
not the result of evaluating the path
  t1: [ a-word-with-no-value-functor "one" ]

  t2: [ functor t1 ]  ; t1 is a word, not a block, but is bound to 
  a block at the time the path is extended into it ( if possible without 
  t2 being an object! )
  t2: context [ functor t1] ; also trivial
RobertS:
14-Sep-2007
I realized there was this traversal option using a lit-path! treated 
as a series! but it did not seem to if what I already had was a path! 
 held by a word and I wanted to 'extend' that value with a word.

This arises when the embedded word becomes bound to a different block. 
 In that case an OBJECT! looks to be the only option but then the 
WORDSs in the PATH come already bound to values and so are not 'functors' 
as are 'a 'd and 'e in your example.

I  want to construct a resultant valid path! from a valid path! + 
a lit-word where that word has no value but serves only as functor.

I had hoped that the func to-lit-path would be the answer, but I 
see now that the default Rebol DO path! evaluation precludes this 
kind of 'append'.

I should be able to use a modified version of your eval-path func 
to take as args a valid path! and a word!

My path idea is more like a 'tilde' than our '/' such that I can 
have
        ; blk/key~wrd1~wrd2~wrd3 ... ~wrd-n     ; e.g.,  
    path~wrd1~wrd-i~wrd-j ~wrd-k    ; becomes
; ...
    path2~wrd-m~wrd-n  ;  i.e.,
        ; blk/key/putative-confirmed-key~wrd-m~wrd-n   
PARSE is likely part of the answer if I go that TILDE route.
Once I have a lit-path! your eval-path is the traversal.
A blk of args to a func such as

  construct_dpath: func  [ dpath [lit-path!]  functor-words-blk  [block! 
  ]  /local v1 v2] [ 

should model my case OK and that dpath can be constructed by modified 
versions of your eval-path.  Thanks
Gabriele:
19-Nov-2007
>> probe get-modes tcp:// 'interfaces
[make object! [
        name: "lo"
        addr: 127.0.0.1
        netmask: 255.0.0.0
        broadcast: none
        dest-addr: none
        flags: [loopback]
    ] make object! [
        name: "eth0"
        addr: 192.168.1.4
        netmask: 255.255.255.0
        broadcast: 192.168.1.255
        dest-addr: none
        flags: [broadcast multicast]
    ]]
Will:
12-Jan-2008
Michael: notice the difference between mold and mold/all :
>> a: context [b: 1]

>> a/b
== 1

>> c: mold a

== "make object! [^/    b: 1^/]"

>> a: load c

== [make object! [
        b: 1
    ]
]

>> a/b
** Script Error: Invalid path value: b

** Near: a/b
>> a: do load c

>> a/b         
== 1

>> a: context [b: 1]
>> c: mold/all a
== "#[object! [^/    b: 1^/]]"
>> a: load c
>> a/b
== 1
>>
Henrik:
21-Jan-2008
make object! []

and context []

and see what's returned
Henrik:
21-Jan-2008
or more revealing:

>> source context

context: func [

    "Defines a unique (underived) object." 

    blk [block!] "Object variables and values."

][

    make object! blk

]
Anton:
21-Jan-2008
o1: context [my-word: "hello"]
o2: context [my-word: "there"]
o3: make object! [my-word: "SteveT"]
SteveT:
21-Jan-2008
o1: context [mu-word: "hello"]
>> o2: context [my-word: "there"]
>> o3: make object! [my-word: "SteveT"]
>> code: []
== []
>> append code in o1 'my-word
== [none]
>> append code in o2 'my-word
== [none my-word]
>> append code bind [my-word] o3
== [none my-word my-word]
>> print code
none there SteveT

Yep think so that 's what i got now
Anton:
21-Jan-2008
Correct. (context = object).
So my above example could be modified to:

	append code bind [my-word] in o3 'self


which is in fact how we used to have to do it, because BIND didn't 
have object! in list of accepted types for its known-word argument.
BrianH:
21-Jan-2008
Gregg, your code is more complex than it needs to be. Try this:

with: func [object [any-word! object! port!] block [block!]] [
    do bind/copy block object
]


This is unnecessary in R3, where you can use DO IN instead of WITH.
PeterWood:
22-Jan-2008
Henrik: I believe that Rebol does have real inheritance, it's just 
based on protoytpes not classes:

>> a: make object! [b: func[][print "I'm from object a"]]
>> c: make a []
>> c/b
I'm from object a
>> d: make a [e: func [][print "I'm an extension to a"]] 
>> d/e
I'm an extension to a
>> f: make d [b: func [][print "I'm not the one in a"]]
>> f/b
I'm not the one in a
PeterWood:
22-Jan-2008
This even gives an inefficent way of extending an object:

>> a: make object! [b: func[][print "I'm from object a"]]
>> a: make a [c: func[][print "My new method"]]
>> a/b
I'm from object a
>> a/c
My new method
Anton:
22-Apr-2009
A FIELD is a style, just like BUTTON, AREA etc. See the full list 
of available built-in styles like this:

	print mold extract svv/vid-styles 2

Check the ACCESS facet of a style to see what GET-FACE returns.
For BUTTON, it is:

	>> print mold svv/vid-styles/button/access
	make object! [
	    set-face*: func [face value][face/data: value]
	    get-face*: func [face][face/data]
	    clear-face*: func [face][face/data: false]
	    reset-face*: func [face][face/data: false]
	]


You can see that using GET-FACE on a BUTTON just returns face/data. 
Buttons by default don't use their data facet for anything, so it's 
NONE. (You could use the data facet to relate a button to something 
else that the button is associated with.)

Here's an example where a button does GET-FACE on a field.


 view layout [button "get-face field" [probe get-face my-field] my-field: 
 field "hello"]
Anton:
23-Apr-2009
I advise you to review each facet in the face object:

	print mold first system/standard/face

and compare with the slightly larger vid-face:

	print mold first system/view/vid/vid-face


(Note, here FIRST is being used to return just the words of an object!, 
without their values. If you just probe a face it will fill up your 
console...)
mhinson:
7-May-2009
I have been looking at the library examples & noticed that some of 
them start off with something like
navigator: make object! [

The ones like this dont do anything so I am guessing I need to use 
this code in a way I have not come across yet. I have been madley 
trying things like

make a: navigator  and looking up make in the documentation, but 
not understanding the answers.
Henrik:
7-May-2009
make object! is the same as making a context. If you see an entire 
script wrapped in make object! [] or context [], it is because it 
was desired to use this script with other scripts without polluting 
the global namespace.
Sunanda:
7-May-2009
That's the way I do it, using 'context / make object!

Some people prefer using blocks rather than objects:
    blk: [a 4 b 5 c 6]
    blk/b
    == 5
   blk/b: 99
   probe blk
    == [a 4 b 99 c 6]

There are advantages and disadvantages to each approach.
Henrik:
12-May-2009
vars: make object! [
	b: c: none
]

f1: func [a] [
	vars/b: join a "-Bee"
	vars/c: join b "-Cee"
	vars
]
PeterWood:
12-May-2009
Each object has its own context. All variables in the object are 
local to the object's context. Only the object "variable" would be 
in the global context:

>> a: 1

== 1

>> obj: make object! [
[    a: "one"
[    b: "two"
[    c: "three"

[    ]
>> a
== 1
>> obj/a
 
== "one"

>> b

** Script Error: b has no value
** Near: b

>> obj/b
 
== "two"
Group: MySQL ... [web-public]
Gregg:
20-Oct-2010
You should get back a top-level JSON object, but nested blocks will 
be arrays, not objects. e.g.


>> rebol-to-json [a: 1 b: 2 c: [d: 4 e: 5] f: #[object! [g: 6 h: 
7]]]

== {["a", 1, "b", 2, "c", ["d", 4, "e", 5], "f", {"g": 6, "h": 7}]}
Group: Linux ... [web-public] group for linux REBOL users
Oldes:
31-Aug-2010
I'm not using View for a very long time, but I guess you must first 
make the font object!
Group: AGG ... to discus new Rebol/View with AGG [web-public]
Anton:
13-Jul-2005
http://www.lexicon.net/antonr/rebol/gui/demo-direction-pointer.r
make object! [
    size: 1333
    date: 13-Jul-2005/2:01:33
    type: 'file
]

http://www.lexicon.net/antonr/rebol/gui/direction-pointer.rmake 
object! [
    size: 2033
    date: 13-Jul-2005/2:01:25
    type: 'file
]
Group: Web ... Everything web development related [web-public]
Anton:
8-Feb-2005
>> path-thru http://www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r?script-name=slim.r

== %/D/Anton/Dev/Rebol/View/public/www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r%3Fscript-name=slim.r

>> load-thru http://www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r?script-name=slim.r
connecting to: www.rebol.org
connecting to: www.rebol.org
== [
    SLiM: make object! [
        id: 1
        slim-path: what-dir
        libs: []
        paths: []
        linked-libs:...

>> exists-thru? http://www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r?script-name=slim.r

== %/D/Anton/Dev/Rebol/View/public/www.rebol.org/cgi-bin/cgiwrap/rebol/download-a-script.r%3Fscript-name=slim.r
Gabriele:
7-Nov-2006
i just let the session variable be whatever the user wants. it could 
be an object!, or a block!, or whatever.
Group: SDK ... [web-public]
Maxim:
10-Nov-2006
when not in view:  (on windows)  Graham posted this a while back:

win-lib: make object! [
	
	user-lib: load/library %user32.dll

	SetWindowText: make routine! [
		handle			[integer!]
		Title			[string!]
		return:			[integer!]
	] user-lib "SetWindowTextA"
	
	set 'WindowTitle func [
		Title [string!] 
	] [
		SetWindowText get-modes system/ports/system 'window Title
	]	
]
Anton:
3-Mar-2009
It should return

	== object!
amacleod:
3-Mar-2009
When I insert  - probe type? svv/vid-styles/panel/access

into the script I get Object!

but after I encap I get -
** Script Error: svv has no value
** Near: probe type? svv/vid-styles/panel/access
dump-obj: func
amacleod:
3-Mar-2009
For script - ==Object!
Graham:
26-Apr-2009
user-prefs: make object! [ debug: false ]
amacleod:
26-Apr-2009
I did not make it an object! Just had user-prefs: [debug: false]

Works now!

Thanks again Graham!
BrianH:
22-Jun-2010
Tossing in an ASSERT/type [system/view [object!]] into INSEERT-EVENT-FUNC 
would be even less confusing.
Group: !RebGUI ... A lightweight alternative to VID [web-public]
Ashley:
4-Jun-2005
Earlier builds of RebGUI used the following code to minimise the 
problem:

	context [
		show*: :show
		set 'show func [face [object! block!]] [show* face recycle]
	]

which kind of points to the GC as the problem.
Ashley:
9-Jun-2005
Also fixed display/popup to work with latest view betas by adding 
"feel: make object! []" to the popup face prior to display.
shadwolf:
30-Jun-2005
actually not because we have several problems on recursion group 
interpretation on gradient effect (fill and for border line fill) 
so now we are trying to make a better engine that can be use more 
efficient ly rebol object! properties we are basing our work on xml-to-object 
function ...
shadwolf:
30-Jun-2005
so you have an XML  struture we transforme it to a REBOL Object! 
tree then this tree must be glanced and translated to have the AGG 
draw block ;)
Graham:
13-Aug-2005
Occurring here ...

	colors: make object! [
		window:		236.233.216		; used by display.r
		widget:		244.243.238
;		widget:		248.248.248
		edge:		127.157.185
		edit:		white			; area, field, password, etc
		over:		gold			; active button, tab, splitter, etc
		menu:		49.106.197		; menu, popup highlight
		btn-up:		200.214.251
		btn-down:	216.232.255
		btn-text:	77.97.133
	]
Graham:
22-Aug-2005
Also, how about an accessor function like

show-focus: func [ face [object!]][
	rebfocus face
	show face
]
Graham:
23-Sep-2005
I'm doing some async io, which works with View, but in Rebgui, I 
get the following error when I click on my button

make object! [
    code: 312
    type: 'script
    id: 'cannot-use
    arg1: 'path
    arg2: 'none!
    arg3: none
    near: [if pf/data <> face/data [
            old: pf/data
            if old [
                clear skip pf/pane/:old/effect/draw 7
                show pf/pane/:old
            ]
            pf/data: face/data

            insert tail face/effect/draw [pen leaf fill-pen leaf circle 6x10 
            3]
            show face
            face/action face
        ]]
    where: 'switch
]
Graham:
25-Sep-2005
Any idea on why this error occurs?

make object! [
    code: 312
    type: 'script
    id: 'cannot-use
    arg1: 'path
    arg2: 'none!
    arg3: none
    near: [if pf/data <> face/data [
            old: pf/data
            if old [
                clear skip pf/pane/:old/effect/draw 7
                show pf/pane/:old
            ]
            pf/data: face/data

            insert tail face/effect/draw [pen leaf fill-pen leaf circle 6x10 
            3]
            show face
            face/action face
        ]]
    where: 'switch
]
Group: Rebol School ... Rebol School [web-public]
Henrik:
8-Feb-2009
context is just another word for "make object!"
Geomol:
16-Feb-2009
o: make object! [t: "abc" level: length? t]
build-markup {<%o/level%>}
Geomol:
16-Feb-2009
>> o: make object! [t: "abc" level: length? t f: func [] [return 
build-markup {<%level%>}]]
>> o/f
== "***ERROR no-value in: level"

heh, funny! :-)
Group: rebcode ... Rebcode discussion [web-public]
Rebolek:
3-Nov-2005
Is/will be  possible to use apply on function in object! ? Following 
code does not work:
Group: Tech News ... Interesting technology [web-public]
BrianH:
3-Sep-2008
Rebcode will come as a side-effect of user-defined function types, 
which require user-defined datatypes, which requires the plugin model, 
which requires modules, which may require changes to object!, which 
are partly based on changes to the core that result from his current 
VID work.
Group: !REBOL3-OLD1 ... [web-public]
Chris:
26-Apr-2006
What are the advantages over creating an object! context?
BrianH:
1-May-2006
;The changed build function would be:
build: func [
    {Build a block using given values}
    block [block! paren! path! lit-path! set-path!]
    /with
    values [block!]
    /local context inner
] [
    values: any [values [only: :encl ins: :dtto]]
    context: make object! values
    inner: func [block /local item item' pos result] [
        result: make :block length? :block
        parse block [
            any [
                pos: set item word! (

                    either all [item': in context item item <> 'self] [
                        change pos item'
                        set/any [item pos] do/next pos
                        insert tail :result get/any 'item
                    ] [insert tail :result item pos: next pos]
                ) :pos | set item get-word! (

                    either all [item': in context item item <> 'self] [
                        insert/only tail :result get/any item'
                    ] [insert tail :result item]
                ) | set item [

                    block! | paren! | path! | set-path! | lit-path!
                ] (
                    insert/only tail :result inner :item

                ) | set item skip (insert/only tail :result get/any 'item)
            ]
        ]
        :result
    ]
    inner :block
]
Geomol:
12-Feb-2007
My suggestion is close to Ladislav's ++ function above and is something 
like:

>> inc: func [x] [either word? x [set x 1 + get x] [x + 1]]


But as Maxim point out, there are ploblems with paths. But what is 
the path representing? A block or an object or what? If it's in an 
object, it'll work this way:

>> o: make object! [a: 0]
>> inc in o 'a

It's harder to deal with values inside blocks.
BrianH:
13-Feb-2007
There are no object! accessors, to be sure, except for field setting 
and getting. It definitely makes sense to add them to object! types, 
but it doesn't make sense to add them to non-object types.
Group: Postscript ... Emitting Postscript from REBOL [web-public]
Graham:
5-Dec-2008
Doesn't seem to work with layouts from rebgui

>> lo2: display "Test" [ text "hello" ]
>> unview/all
>> type? lo2
== object!
>> to-postscript lo2
** Script Error: Cannot use path on none! value
** Where: ps-face
** Near: if f/font/name [append font-name 'Helvetica]
if find
Group: !Cheyenne ... Discussions about the Cheyenne Web Server [web-public]
Terry:
3-Oct-2008
Hey Doc, Im using the embed version of Cheyenne, but I can't grab 
any files for downloading.. the dialog box opens, but the content 
is empty.. with this error in the console.. 
target: rockstar.rar

## Error in [uniserve] : On-received call failed with error: make 
object! [
    code: 312
    type: 'script
    id: 'cannot-use
    arg1: 'path
    arg2: 'none!
    arg3: none
    near: [either req/file-info/size > 16384 [
            req/out/content: req/in/file
        ]]
    where: 'handler
] !

Any ideas?
Terry:
4-Oct-2008
Scope issue (my Rebol is rusty)... what I did was copy the content 
->  qstr: make object! decode-cgi to-string req/in/content
and make my own object . Im guessing this is not ideal
Terry:
4-Oct-2008
here's my default function.. 

  default: func [req params svc][
    raw-input: trim req/in/target
	if raw-input = ""[raw-input: "index.html"]
	qstr: make object! decode-cgi to-string req/in/content 
	bout: copy ""
	requesttype: "http"
	commander
	bout		 		
  ]
]

I want to pass the params to the commander function
Dockimbel:
21-Oct-2008
Webapps are, from v 19, contained in their own context (object!). 
'do will first bind the loaded code to the webapp context before 
executing it.
Graham:
31-Dec-2008
1-Jan-2009/9:16:46+13:00 : make object! [
    code: 305
    type: 'script
    id: 'invalid-arg
    arg1: true
    arg2: none
    arg3: none
    near: [set-modes new [no-delay: on]]
    where: 'init-connection
]
Graham:
31-Dec-2008
REBOL/View 2.7.6.3.1 14-Mar-2008
Copyright 2000-2008 REBOL Technologies.  All rights reserved.
REBOL is a trademark of REBOL Technologies. WWW.REBOL.COM
>> do %cheyenne.r
make object! [
    code: 303
    type: 'script
    id: 'expect-arg
    arg1: 'context
    arg2: 'blk
    arg3: [block!]
    near: [extension-class: context list]
    where: func [/local list][
        list: extract phases 2
        forall list [change list to-set-word list/1]
        repend list [to-set-word 'service none]
        extension-class: context list
    ]
]
>>
Graham:
15-Feb-2009
Getting this when trying to load my login.rsp page in my webapp


16/2-16:46:24.353-## Error in [task-handler-49652] : Make object! 
[
    code: 303
    type: 'script
    id: 'expect-arg
    arg1: 'protected-exec
    arg2: 'code
    arg3: [block! function!]

    near: [protected-exec/event request/parsed/file get in session/events]
    where: 'fire-event
] !
Graham:
7-Mar-2009
hhmm.. I'm getting this

7-Mar-2009/21:17:18+13:00 : make object! [
    code: 507
    type: 'access
    id: 'no-connect
    arg1: 127.0.0.1
    arg2: none
    arg3: none

    near: [server: open/binary/direct rejoin [tcp:// server-address ":" 
    server-port] 
        set-modes
    ]
    where: 'connect
]
BrianH:
2-Apr-2009
2/4-22:54:04.266-## Error in [uniserve] : On-received call failed 
with error: make object! [
    code: 303
    type: 'script
    id: 'expect-arg
    arg1: 'insert
    arg2: 'series
    arg3: [series! port! bitset!]
    near: [insert/part tmp/port s skip e]
    where: 'process-bounded-content
] !
BrianH:
3-Apr-2009
Same error after upgrading Chromium, here's the verbose 5 log of 
the request:


3/4-01:38:00.891-[HTTPd] ================== NEW REQUEST ==================

3/4-01:38:01.531-[HTTPd] Request Line=>POST /ecg/blah.rsp HTTP/1.1

3/4-01:38:02.109-[HTTPd] Trying phase method-support ( mod-static 
)

3/4-01:38:02.828-[HTTPd] Trying phase url-translate ( mod-static 
)
3/4-01:38:03.062-[uniserve] Calling >on-received< with {^M
Host: localhost:8080^M
Connection: keep-alive^M
Us}
3/4-01:38:03.547-[HTTPd] Request Headers=>
Host: localhost:8080
Connection: keep-alive

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.5 
(KHTML, like Gecko) Chrome/2.0.173.0 Safari/530.5
Referer: http://localhost:8080/ecg/blah.html
Content-Length: 153149
Cache-Control: max-age=0
Origin: http://localhost:8080

Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryEv3SZArZWdjyznJZ

Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Encoding: gzip,deflate,bzip2,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3



3/4-01:38:03.797-[HTTPd] Trying phase url-to-filename ( mod-alias 
)
3/4-01:38:04.031-[HTTPd] => request processed
3/4-01:38:04.766-[HTTPd] Trying phase url-to-filename ( mod-rsp )
3/4-01:38:05-[HTTPd] => request processed

3/4-01:38:05.469-[HTTPd] Trying phase url-to-filename ( mod-internal 
)

3/4-01:38:05.719-[HTTPd] Trying phase url-to-filename ( mod-static 
)
3/4-01:38:05.969-[HTTPd] => request processed

3/4-01:38:06.453-[uniserve] >> Port: 3789, low-level reading: 17520

3/4-01:38:06.703-[uniserve] >> Port: 3789, low-level reading: 17520

3/4-01:38:06.953-[uniserve] >> Port: 3789, low-level reading: 17520

3/4-01:38:07.437-[uniserve] >> Port: 3789, low-level reading: 17520

3/4-01:38:07.906-[uniserve] >> Port: 3789, low-level reading: 19980

3/4-01:38:08.391-[uniserve] Calling >on-received< with "------WebKitFormBoundaryEv3SZArZWdjyznJZ^M^/Content-"

3/4-01:38:08.875-[uniserve] >> Port: 3789, low-level reading: 16680

3/4-01:38:09.344-[uniserve] >> Port: 3789, low-level reading: 17520

3/4-01:38:09.844-[uniserve] >> Port: 3789, low-level reading: 17520

3/4-01:38:10.312-[uniserve] >> Port: 3789, low-level reading: 1149

3/4-01:38:10.797-[uniserve] Calling >on-received< with {037.17923" 
"4429 SUNNYSLOPE RD SW" "Port Orchard" }

3/4-01:38:11.266-## Error in [uniserve] : On-received call failed 
with error: make object! [
    code: 303
    type: 'script
    id: 'expect-arg
    arg1: 'insert
    arg2: 'series
    arg3: [series! port! bitset!]
    near: [insert/part tmp/port s skip e]
    where: 'process-bounded-content
] !
3/4-01:38:11.734-[uniserve] Port closed : 127.0.0.1
Dockimbel:
20-May-2009
Q2 : The REQ argument is set to the current request object. If you 
get none instead of an object!, you've probably messed up something 
in Cheyenne/UniServe internals.
Robert:
12-Jun-2009
I have a problem, that after some running time Cheyenne seems to 
get into an unstable state and my REST shopping-cart isn't working 
any longer. I got this error in the trace.log, which seems to be 
Cheyenne internal:


5/6-10:09:48.142823-## Error in [task-handler-40014] : Make object! 
[                                                                
                 
    code: 501                                  
                                                                 
                                      
    type: 'access         
                                                                 
                                                           
    id: 
'not-open                                                        
                                                                 
            
    arg1: "Port"                                    
                                                                 
                                 
    arg2: none                 
                                                                 
                                                      
    arg3: 
none                                                             
                                                                 
          
    near: [parse/all current: fourth entry [          
                                                                 
                               
            any [                
                                                                 
                                                    
            
    end break                                                    
                                                                 
        
                | "#[" copy value to #"]" skip (        
                                                                 
                             
                    append out reform 
[                                                                
                                               
                 
       " prin any [pick cat"                                     
                                                                 
   
                        locale/id? value                     
                                                                 
                        
                        mold value #"]" 
                                                                 
                                             
                   
 ]                                                               
                                                                 
 
                )                                              
                                                                 
                      
                | "<%" [#"=" (append out " 
prin ") | none]                                                  
                                          
                copy value 
[to "%>" | none] 2 skip (                                        
                                                          
      
              if value [repend out [value #" "]]                 
                                                                 
              
                )                                 
                                                                 
                                   
                | s: copy value 
[any [e: "<%" :e break | e: "#[" :e break | skip]] e: (          
                                                     
           
         append out reform [" txt" index? s offset? s e #" "]    
                                                                 
         
                )                                      
                                                                 
                              
            ]                     
                                                                 
                                                   
        ]]   
                                                                 
                                                                 
       
    where: 'confirm                                      
                                                                 
                            
] !                                 
                                                                 
                                                 
5/6-23:01:46.501455-## 
Error in [task-handler-40014] : Make object! [                   
                                                              
  
  code: 501                                                      
                                                                 
                  
    type: 'access                             
                                                                 
                                       
    id: 'not-open        
                                                                 
                                                            
    
arg1: "Port"                                                     
                                                                 
                
    arg2: none                                  
                                                                 
                                     
    arg3: none             
                                                                 
                                                          
    near: 
[unless no-lang [                                                
                                                                 
          
            id: locale/lang                           
                                                                 
                               
            locale/set-default-lang 
                                                                 
                                                 
        ]      
                                                                 
                                                                 
     
        out: make                                          
                                                                 
                          
    ]                                 
                                                                 
                                               
    where: 'confirm 
                                                                 
                                                                 

] !
ChristianE:
19-Jul-2009
#[object! [ code: 502 type: access id: cannot-open arg1: %/E/Cheyenne/ 
arg2: #[none] arg3: #[none] near: [change-dir save-path compress-output 
all [ not response/buffered? not empty? response/buffer response/flush 
response/flush/end ] ] where: #[none] ]]
Graham:
1-Aug-2009
1-Aug-2009/10:34:38-7:00 : make object! [
    code: 303
    type: 'script
    id: 'expect-arg
    arg1: 'set-modes
    arg2: 'target
    arg3: [file! url! block! port!]
    near: [set-modes sys remote-mode]
    where: 'set-tray-remote-events
]
Graham:
1-Aug-2009
now have this error when using the test appp

1-Aug-2009/23:37:10+12:00 : make object! [
    code: 507
    type: 'access
    id: 'no-connect
    arg1: 127.0.0.1
    arg2: none
    arg3: none

    near: [server: open/binary/direct rejoin [tcp:// server-address ":" 
    server-port] 
        set-modes
    ]
    where: 'connect
]
Graham:
1-Aug-2009
Latest now works on Windows 7 but still fails on Windows 2003

1-Aug-2009/11:54:59-7:00 : make object! [
    code: 303
    type: 'script
    id: 'expect-arg
    arg1: 'set-modes
    arg2: 'target
    arg3: [file! url! block! port!]
    near: [set-modes sys remote-mode]
    where: 'set-tray-remote-events
]
Robert:
18-Aug-2009
10/7-15:13:14.250992-[RSP] ##RSP Script Error:                   
                                                                 
                    
                                            
                                                                 
                                         
        URL  = yogalinks.rsp?rest=addtocart 
                                                                 
                                         
        File = /var/www/cheyenne/yogalinks.rsp 
                                                                 
                                      
                          
                                                                 
                                                           
     
   ** Script Error : Invalid argument: o                         
                                                                 
               
        ** Where: to-integer                     
                                                                 
                                    
        ** Near:  [to integer! 
:value]                                                          
                                                      
          
                                                                 
                                                                 
          
                                                      
                                                                 
                               
Request  = make object! [        
                                                                 
                                                    
    headers: 
[Host "www.yogalinks.eu" User-Agent {Mozilla/5.0 (Macintosh; U; Intel 
Mac OS X 10_5_7; de-de) AppleWebKit/525.28.3 (KHTML, like Gecko) 
Ve
    status-line: #{                                           
                                                                 
                       
504F535420796F67616C696E6B732E7273703F726573743D616464746F636172 
                                                                 
                    
7420485454502F312E300D0A                    
                                                                 
                                         
}                      
                                                                 
                                                              
  
  method: 'POST                                                  
                                                                 
                  
    url: "yogalinks.rsp?rest=addtocart"       
                                                                 
                                       
    content: #{          
                                                                 
                                                            
70726F647563745F69643D596F67616D617425323045636F25323050726F2671 
                                                                 
                    
75616E746974793D6F26636F6C6F723D626F72646561757825324667726175 
                                                                 
                      
}                                         
                                                                 
                                           
    path: "/"        
                                                                 
                                                                
 
   target: "yogalinks.rsp"                                       
                                                                 
                   
    arg: "rest=addtocart"                    
                                                                 
                                        
    ext: '.rsp          
                                                                 
                                                             
   
 version: none                                                   
                                                                 
                 
    file: %/var/www/cheyenne/yogalinks.rsp     
                                                                 
                                      
    script-name: none     
                                                                 
                                                           
]
Group: !CureCode ... web-based bugtracking tool [web-public]
Graham:
16-Jan-2010
Now get 


#[object! [ code: 501 type: access id: not-open arg1: "Port" arg2: 
#[none] arg3: #[none] near: [if empty? block: reduce block] where: 
confirm ]]
201 / 89212[3] 456789