[Glass] SIXX question

Dale Henrichs via Glass glass at lists.gemtalksystems.com
Thu Jan 22 15:14:46 PST 2015


Dario,

I don't think that SIXX was designed to do partial instance updating (or 
partial object graph updating for that matter).

Since SIXX is going to want to write out whole objects you might try 
using SIXX to write out the value of the varC instance variable and then 
set the varC instance variable on load ... I would think that you should 
be very careful when doing this. If there are any references from 
objects under varC that are shared by other parts of the object graph 
that you are not writing out, then you will end up with duplicate 
objects ...

There are probably ways to do this, but you are entering into unexplored 
territory here...

Before going to far, could you share the use case for needing to do this 
partial "object graph update" ... perhaps there is a different approach 
to the problem that would work better or at least not require a new 
framework for support?

Dale

On 01/20/2015 04:16 AM, Dario Trussardi via Glass wrote:
> Hi,
>
> 	i have a question about SIXX support.
> 	
> 	I hope to found some considerations in this list.
>
> 	Questions:
>
> 		i have a class with some instances variable definitions. ( varA  varB  varC varD 	ecc...... )
>
> 		Now when i save the data with sixx support i need to manipulate one specific instance ( for example varC  set too dictionary )
> 	
> 		for save only some varC sub dictionary element.
>
> 		If i use for the class the method :
>
> 		 	sixxContentOn: aStream indent: level context: dictionary
>
> 		i need to manage all the instances variable into it.
>
> 			self	 sixxInstVarNamed: #varA
> 			value: (self varA)
> 			on: aStream
> 			indent: level
> 			context: dictionary.
>
>
> 			self sixxInstVarNamed: #varB
> 			value: ( self varB )
> 			on: aStream
> 			indent: level +1
> 			context: dictionary.
> 	
> 			self	 sixxInstVarNamed: #varC
> 			value:  (self varC select:[:x | ( x isKindOf: SupportoCtlSys) not  ])
> 			on: aStream
> 			indent: level +1
> 			context: dictionary.
>
> 	
>
> 		But all other instances is ok, i need to manage only varC
> 	
> 		How i can do it?
>
> 		The class is complex and manipulates all instances variable is not a good solution.	
>
>
> 		Thanks for any considerations.
>
> 			Dario
> 	
> 	
>
> 	
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass



More information about the Glass mailing list