Hi Tobi, Sorry about the delay.
> OK, then another, more self-contained way. You have a class Firmata which is > instantiable and you want to keep track of the instances, right? Then modify > Firmata.class like so: > > Static Private $cObjects As New Collection > > Static Public Sub _get(Name As String) As Firmata > ' Search through registered objects > Return $cObjects[Name] > End > > Public Sub _new(Name As String) > ' Register every newly created Firmata object > $cObjects[Name] = Me > End > > There is a static Collection which records every newly created object. You > must now specify a name for each Firmata object on creation. Given a string > variable sName which contains a the name of an existing Firmata object you > can obtain the object simply as > > hMyFirmata = Firmata[sName] > > The above code will give you circular reference errors and it does not > include a way to remove an instance from the Collection so that its refcount > drops to zero and the Firmata object can be deleted. I have not enough time > ATM to make a better example, but if you get the idea, I'm sure you can fix > the remaining issues. It seems an interesting option, but still did not dedicated enough time to even analyze. I have little free time these days.. :( Next week I will try continue this. ;) Regards and thanks for all, Matias ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140 _______________________________________________ Gambas-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gambas-user
