[plt-scheme] Catch an unknown method error
I recommend a macro for method calls:
(send <exp> <name> <exp1> ...)
-->
(with-handlers ((... (lambda (x) (printf "method not found ...") ...))
(send:proper <exp> <name> <exp1> ...))
Then re-export new-send as send and write code as usual. -- Matthias
On Feb 20, 2008, at 4:49 PM, Filipe Cabecinhas wrote:
>
> On 20 Feb, 2008, at 21:31, Robby Findler wrote:
>> It's clear! I guess the easiest thing would be to write a macro that
>> consumes the names of the methods and generates classes that respond
>> to those methods. Something like this:
>>
>> <snip>
>>
>
>
> Yes, I'm doing something like that. But I have tons of methods (I'm
> interfacing with a big program) and that solution doesn't scale
> well. But I'll just keep it and try to find better ways. Thanks
> anyway.
>
> F
>
>
>
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme