rugby: object functions?
[1/3] from: dlhawley::attbi::com at: 12-Feb-2002 15:40
Just starting to play with rugby. But my first diff from examples was an
attempt to serve object functions.
fob: make object! [
a: func [] [print "a" ]
]
trying to server fob and fob/a give the same error as seen below. It
would be nice to be able to serve functions in an objectby just passing
the object, but perhaps this makes no sense.
Dave
>> serve/with [fob ] tcp://:9092
a
** Script Error: to-word is missing its value argument
** Where: build-stubs
** Near: append stub build-proxy/with to-word entry
>> serve/with [fob/a ] tcp://:9092
a
** Script Error: to-word is missing its value argument
** Where: build-stubs
** Near: append stub build-proxy/with to-word entry
[2/3] from: rebol665:ifrance at: 13-Feb-2002 10:44
Hi
Here is a solution.
>> do %rugby.r
>> fob: make object! [
[ a: func [] [print "a" ]
[ ]
>> fn: get in fob 'a
>> serve [fn ]
HTH
Patrick
[3/3] from: dlhawley:attbi at: 13-Feb-2002 15:21
pat,
Thanks that is a bit easier than creating cover functions any way. I'd
still like to just pass to object and have rugby figure it out.
Dave
pat665 wrote: