Rugby: function's definition too complicated?
[1/4] from: fvzv:ibelgique at: 15-Nov-2003 21:25
Hello,
Hello, i am new to rugby and I have the following problem: i defined the
follwing function:
set 'dao-find-cases function [
user [object!]
/first-name fn [string!]
/last-name ln [string!]
] [] [ ... some code ....]
This function is on the server side and made public through rugby. But
when I called the function from the client:
dao-find-cases/first-name/last-name current-user "Vanzeveren" "François"
I get the following error:
** Script Error: dao-find-cases expected fn argument of type: string!
** Near: dao-find-cases/first-name/last-name
make object! [
initials: "syb"
office-id: "bdl"
first-name: "Sybil"
last-name: "Broughton"
office-name: "Boondael"
to-string: func [/local str] [
str: make string! ""
append str reduce ["initials [" initials "]"]
append str reduce [", office-id [" office-id "]"]
append str reduce [", first name [" first-name "]"]
append str reduce [", last name [" last-name "]"]
append str reduce [", office name [" office-name "]"]
]
]
it looks like rugby can not handle a mix of mandatory arguments and
refinement's arguments. Could some help me with this issue?
Regards
François
_____________________________________________________________________
Un mot doux à envoyer? Une sortie ciné à organiser? Faites le en temps
réel avec MSN Messenger! C'est gratuit! http://ifrance.com/_reloc/m
[2/4] from: maarten:vrijheid at: 16-Nov-2003 7:49
It may be that the sending of the object on the wire causes this, I
don't know. AFAIK this should work, but you can easily try:
Send a block in stead of the object. Then convert that to an object on
the other side. If that works, it is the transport, otherwise there is a
fair chance that you are doing soemthing wrong yourself. What you ghet
back is the error from your function (I designed Rugby to provide
transparaent error
propagation).
Rugby development has more or less stopped, I think there are so many
easy ways to send messages between REBOL instances that I won't pick it
up again.
If anybody wants to pick up the current version, he/she is more than
welcome as I will take it offline somewhere this month.
--Maarten
[3/4] from: antonr::iinet::net::au at: 16-Nov-2003 22:40
Maarten, if you could post the current link, I
will make sure it's at least in my cache.
Anton.
[4/4] from: maarten:vrijheid at: 16-Nov-2003 16:53
http://www.koopgoedkoop.net/rugby.zip
--Maarten