2009/12/29 Dr. Diesel <[email protected]>: > On Mon, Dec 28, 2009 at 6:14 AM, Fabien Bodard <[email protected]> wrote: > >> use a class ; >> TDBInfo >> 'Gambas Class >> >> PUBLIC DatabasePath As String >> PUBLIC DatabaseName As String >> PUBLIC TableName As String >> PUBLIC PurgeSQL As String >> PUBLIC PurgeSQL2 As String >> >> >> then : >> >> Public DatabaseInfo As DBinfo[NUM_MAX_DB] >> >> > Thank you! I can get this to work, just there seems no way to make it > global and accessable across different modules/classes.
So pass the object around. That's what instantiated objects are for, hey. Dim oSomeObject as New cSomeClass Dim sR as String oSomeObject.ObscureProperty = 10 oSomeObject.AnotherObscureProperty = "Some Value" sR = mSomeObscureModule.SomeObscureMethod(oSomeObject) If sR = WhatIexpected then ThrowParty Else Sulk EndIf >> Looking to do something like this from VB6 Gambas is nothing like VB. I struggled with gambas for two months, caught between it and many years of MS experience, from VB2 to .NET 2007. Perseverance and determination will pay off with great rewards, but be prepared for heartache. That, btw, is not any criticism of Gambas. It is more a reflection of the truism that one's learning ability reduces with age :) See...? Class cLogRecord: ' Gambas class file Public LogDate As Float Public Subject As String Public Post As String Public Status As String Public LogFrom As String Public LogTo As String ------------------------------------------------------ Class cProxy: ' Gambas class file ' *************************************************************************** ' * cProxy ' * Manages the data between the client and the server ' *************************************************************************** Private oLog As cLogRecord ' A log record [...] Private Sub SomeMethod() oLog.Status = Buffer mSystemDataManager.AddLog(oLog) End ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev _______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
