[Gambas-bugtracker] Bug #1699: Pointers are not written to memory streams correctly when set to null

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Wed Dec 18 08:13:51 CET 2019


http://gambaswiki.org/bugtracker/edit?object=BUG.1699&from=L21haW4-

Comment #9 by Brian G:

Would you consider adding the following special methods for objects
_serialize returns written length of object
_read(x as file) object can read it's self
_write(x as file) object can write it's self
And have read and write statements look for these methods at runtime
So we can author object that can store themselves and load themselves

So one would write

Write #xx, myobject

Write Call's the _write for the object if present 

Read #xx as myclass

Read. Creates instance of myclass and calls _read if present



This would be a very powerful extention to the io of objects




More information about the Bugtracker mailing list