[Gambas-user] Network Component Problem

Daniel daniel.campos at ...338...
Thu Apr 15 19:01:31 CEST 2004


El jue, 15-04-2004 a las 16:25, Dimitri Bellini escribió:
> Dear All
> 	i want to use the network component so i see the example ServerSocket and i 
> put it in a new Project but when i RUN it Gambas return an Error like this: 
> "Null Object" in this line
> Server.Type=Net.Internet
> The Code:
> -----
> '-------------- Network Server
> PRIVATE Server AS ServerSocket
> PRIVATE Client AS Object[]
> PRIVATE Waiting AS Boolean
> ....
> PUBLIC SUB Button1_Click()
>   
>   IF combobox2.Index=0 THEN
>     'TCP
>     Server.Type=Net.Internet
>     ' The port to listen to
>     Server.Port=Val(TextBox1.Text)
>     ' we start listening
>     Server.Listen(ComboBox1.Index)
>   ELSE
>     ' UNIX
>     Server.Type=Net.Unix ' You could also use Net.Local
>     Server.Path=TxtPath.Text
>     Server.Listen(ComboBox1.Index)
>   END IF
>  -------------------------------
> 
> I used Gambas 0.92a on Mandrake 10, I found a small issue using MDK10 and 
> gambas when error is found the Error Box dont is open in background under the 
> Form.
> 
> PS: If i run The Example Code ServerSocket no problem found.


'NULL object' means that the object was not created when you tried to
read '.Type' property. Look at the server socket example: I create the
object here:

PUBLIC SUB Form_Open()

  ... 
  Server=NEW ServerSocket AS "Server"  <-- Here I create the object
  ...


Check also I you have added 'net' component in the project properties

Regards,

Daniel Campos



> 
> Thanks in advance
> Dimitri
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user





More information about the User mailing list