AftGangAglay Documentation


dumpobj

New in 2.3.0

Note: This function is only available in "dev builds". See here for more information.

Note: It is advised that you read the object documentation before this page in order to familiarise yourself with relevant terms and concepts.

Parameters

Parameter Type Description
object int The object to dump
path string The file path to write the object to

Return Value

N/A

Description

Serializes an object back to a source SGML file. This can be used to implement saving of modified object data in an application editor.

Example

import agan

class game():
	def create(self):
		self.obj = agan.mkobj('foo.sgml')
		return self
	#
	def update(self):
		if(agan.getkey(agan.KEY_S)):
			agan.log('Saving object...')
			agan.dumpobj(self.obj, 'foo_2.sgml')
	#
	def close(self):
		pass