[Gambas-user] Issue 520 in gambas: System.DataTypes is writeable

gambas at ...2524... gambas at ...2524...
Mon May 5 02:26:01 CEST 2014


Comment #2 on issue 520 by adamn... at ...626...: System.DataTypes is writeable
http://code.google.com/p/gambas/issues/detail?id=520

I have been thinking about this and I am not sure whether creating a new  
array is the best answer.

My problem arose when a reference was set to the property:
   myTypes =  System.DataTypes
which was subsequently modified with all the locally declared (public)  
types in the application.  This was fine until the same routine was called  
again. So I got 2 copies of each local datatype in the array.

That problem I have solved by using
   myTypes=System.DataTypes.Copy()
   AddLocalTypes(myTypes)

So, AFAIC, this issue can be closed.

Always creating a new array may cause problems where the programmer is  
explicitly trying to get a pointer to System.Datatypes and a subsequent  
reference will return a different address.  (That's what I have been  
thinking anyway.)

cheers
Bruce

-- 
You received this message because this project is configured to send all  
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings




More information about the User mailing list