From: David G. <da...@cu...> - 2001-10-24 19:35:07
|
Actually this is more of a circular reference problem than a forward reference problem (regardless of what the error message says). Try this code: {let public constant MyClassCallback:Type = {proc-type {class:MyClass}:void}} {define-class public MyClass field public cb:MyClassCallback {constructor public {default} set self.cb = {proc {c:MyClass}:void} } } It gives you the same error. Notice, if you remove the cb field from MyClass the forward reference works fine. Also, you can keep the cb field if you declare MyClassCallback -after- you declare MyClass. I don't know why this works in some code and not in other code. I also don't know why moving the callback after MyClass fixed the problem. For the email client, I would suggest moving the callback declarations to the end of the file an continue from there. If I find any info about what's going on I'll post it. -- Dave "Mueffke" <mueffke@gmx. To: <ch...@bs...>, "David Goldberg" <da...@cu...>, net> <cur...@li...> cc: 10/21/2001 Subject: curl-email: illegal forward reference in AsyncClientConnection.curl 05:47 PM Please respond to "Mueffke" Hi, I tried to write a test for the SMTP package. I get the following error: curl-email/curl-email/AsyncClientConnection.curl:26 Illegal forward reference in definition of AsyncClientConnectCallback curl-email/curl-email/AsyncClientConnection.curl:34 Illegal forward reference in definition of AsyncClientConnectCallback I don't understand that because it works in the email-client. I tried the following and the same errors occured. {curl 1.6 applet} {import * from CURL.IO.SOCKET} {include "AsyncClientConnection.curl"} Some Text! Do you have a clou what's wrong? Friedger PS: Have you seen cur...@li... |