On Feb 11, 2006, at 12:32 PM, Girard Damien wrote:

I am making some useful library for my softwares, and I have got one problem.

How I return an error ?

Because when I use "return", this doesn't work very great.

on hellotest theNumber
  if isnumber(theNumber) is false then
    return "error"
  end if
  ...
end hellotest

I don't understand the problem; you can return whatever you want:

on hellotest pTheNumber
        if not isnumber(pTheNumber) then
                return "ERROR: '" & pTheNumber & "' is not a number."
        end if
        ...
end hellotest

then in the calling handler, just test the result:

        ...
        hellotest someValue
        if the result is not empty then
                handleError the result
        else
                handleSuccess
        end if
        ...

Spence


James P. Spencer
Rochester, MN

[EMAIL PROTECTED]

"Badges??  We don't need no stinkin badges!"

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to