thedesolatesoul Expert Licensed User Longtime User Nov 23, 2012 #1 In many places I save my custom types directly to files using RAF Code: F.WriteObject(DropPipes,False,0) This is usually a list of custom type objects (all the same type). However, these seem to be project/package name dependent. For e.g. it contains the following text(though its not a text file): Code: com.maximussoft.cloudpipes.dpservice$_pipetypew And trying to open it from another package/app gives a ClassCastException. The other app uses the same service/ type definition, only the package name is different. I guess the long way is to save all the primitives my self, whilewalking through the type, I was hoping there was a shorter way. Also, I am not completely sure about the wisdom to use the packagename in the type definition when saving the object. Is that necessary? Thanks.
In many places I save my custom types directly to files using RAF Code: F.WriteObject(DropPipes,False,0) This is usually a list of custom type objects (all the same type). However, these seem to be project/package name dependent. For e.g. it contains the following text(though its not a text file): Code: com.maximussoft.cloudpipes.dpservice$_pipetypew And trying to open it from another package/app gives a ClassCastException. The other app uses the same service/ type definition, only the package name is different. I guess the long way is to save all the primitives my self, whilewalking through the type, I was hoping there was a shorter way. Also, I am not completely sure about the wisdom to use the packagename in the type definition when saving the object. Is that necessary? Thanks.
Erel B4X founder Staff member Licensed User Longtime User Nov 25, 2012 #2 Also, I am not completely sure about the wisdom to use the packagename in the type definition when saving the object. Is that necessary? Click to expand... I agree. It will be changed (without breaking backwards compatibility). Currently your only option is to implement the serialization yourself. Upvote 0
Also, I am not completely sure about the wisdom to use the packagename in the type definition when saving the object. Is that necessary? Click to expand... I agree. It will be changed (without breaking backwards compatibility). Currently your only option is to implement the serialization yourself.
thedesolatesoul Expert Licensed User Longtime User Nov 26, 2012 #3 Thank you Erel. I will do the serialization myself for now. Upvote 0