Thanks Benoit, I will download the last revision. But believe me, in some situations I get the message NULL OBJECT in line... My fault in the definition. Please do not misunderstand me, I am NOT complaining about Gambas, this is rather a cry for help. In this case I was able to solve the prroblems, still I get errors in this case:
*Works:* Public $ConU As New Connection Public ConBack As String Public Procedure ConnectUser() $ConU.Close() ' Close the connection $ConU.Type = "MySQL" ' Type of connection $ConU.Host = "127.0.0.1" ' Name of the server $ConU.Login = "root" ' User's name for the connection $ConU.Port = "3306" ' Port to use in the connection, usually 3306 $ConU.Name = "benutzer" ' Name of the data base we want to use $ConU.Password = "" ' User's password Try $ConU.Open() ' Open the connection If Error Then ConBack = "N" Else ConBack = "J" Endif End *Does not Work:* Public Function ConnectUser() as string $ConU.Close() ' Close the connection $ConU.Type = "MySQL" ' Type of connection $ConU.Host = "127.0.0.1" ' Name of the server $ConU.Login = "root" ' User's name for the connection $ConU.Port = "3306" ' Port to use in the connection, usually 3306 $ConU.Name = "benutzer" ' Name of the data base we want to use $ConU.Password = "" ' User's password Try $ConU.Open() ' Open the connection If Error Then Return "N" Else Return = "J" Endif End Errors in completly different procedures afterwards, not in this one. But do not bother too much with this, I am just wondering what happens here. I am happy with the working part. Thanks and regards, Dag-Jarle 2011/9/12 Benoît Minisini <gam...@users.sourceforge.net> > > Hi, > > > > I am trying to create a pretty complex software here, but things that > > worked a year ago are now completely different. I can understand that, as > > Gambas is heavely developed. For me sometimes a little frustrating - with > > help and hints from the board here I get one step further and get a lot > of > > new things to think about. I changed > > > > Public PROCEDURE ConnectUser() > > > > to > > > > Public Function ConnectUser() As String > > > > and get a lot of errors, f.eks "NULL OBJECT in ...." and "gbx3: > warning: > > .Eval.?.0: Object.LastEventName is deprecated." > > in procedures that worked a minute ago. > > > > I can go back and use a Global to get rhe status of the connection, but I > > wonder how something what is there can be deprecated, and how it is > > possible to see the content of a NULL OBJECT. > > > > I will be grateful for every help, sometimes there is just a little kick > > needed. :-) > > > > regards, > > Dag-Jarle > > If you don't give enough details, nobody can help you. > > Please send a source code project and a way to reproduce the problem. There > is > no "NULL OBJECT in...." message in Gambas, so I don't know what you are > talking about. > > I have removed the deprecated Object.LastEventName property in the last > revision, so now you will get an error and maybe a backtrace that will tell > you where is the problem exactly. > > Regards, > > -- > Benoît Minisini > > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > Learn about the latest advances in developing for the > BlackBerry® mobile platform with sessions, labs & more. > See new tools and technologies. Register for BlackBerry® DevCon today! > http://p.sf.net/sfu/rim-devcon-copy1 > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA Learn about the latest advances in developing for the BlackBerry® mobile platform with sessions, labs & more. See new tools and technologies. Register for BlackBerry® DevCon today! http://p.sf.net/sfu/rim-devcon-copy1 _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user