ActiveConnections returns an array of TCPSocket, so your aTCPSocketArray must be:
dim aTCPSocketarray() as TCPSocket Then you can cast an individual element of the array as JBE_TCPSocket: aTCPSocketarray= JBE_ServerSocket1.ActiveConnections JBE_TCPSocket(aTCPSocketarray(x)).SocketID= y Jim meant to say "dim ac() as TCPSocket". Slip of the fingers. hth, Tim > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] Behalf Of Jeff > Edwards > Sent: Wednesday, May 03, 2006 7:36 PM > To: REALbasic NUG > Subject: Re: assigning a property of a subsclass from tcpsocket > > > Hi Jim, > > I think I tried that but had not success: > > dim aTCPsocketarray() as JBE_TCPSocket > aTCPsocketarray = JBE_ServerSocket1.ActiveConnections > > The second line will give me a type mismatch error, but yes a > typecast is exactly what I would like to be able to do. Is this > possible in Realbasic? > > On 04/05/2006, at 10:22 AM, Jim Dossey wrote: > > > Since nobody else has replied I'll take a shot at it. > > > > My guess is that you need to cast the value returned from > > JBE_ServerSocket1.ActiveConnections to a JBE_TCPSocket. I'm not > > sure how > > you do that with an array, but you can try something like this > > > > Dim ac() As JBE_TCPSocket > > ac = JBE_ServerSocket.ActiveConnections > > JBE_TCPSocket(ac(x)).SocketID = y > > > _______________________________________________ > Unsubscribe or switch delivery mode: > <http://www.realsoftware.com/support/listmanager/> > > Search the archives of this list here: > <http://support.realsoftware.com/listarchives/lists.html> > > _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
