On Aug 31, 2004, at 9:36 AM, Hammuf Sabateh wrote:
Hey, I am getting a NilObjection on "This Line!!!",
it's being run as a console application...
web_ServerSocket_Class.AddSocket:
Function AddSocket() As TCPSocket
dim i as integer
for i=0 to ubound(my_web_S)
if my_web_S(i).self_isdone then
return my_web_S(i)
end if
next
dim s as web_Socket_Class
s = new web_Socket_Class
my_web_S.append s
End Function
The problem is somewhere in here. The AddSocket event will fire a
NilObjectException if you return a nil socket from it. The reason it
shows up in the while loop is because time isn't given back to RB to
fire the events until the DoEvents call happens. Once DoEvents is
called, then the AddSocket event is called, and at some point, this
returns nil (basically, you're forgetting to return s at the end of the
function).
HTH!
~Aaron
--
Microsoft is not the Borg collective. The Borg collective has proper
networking.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
|