NeoTechni Well-Known Member Licensed User Longtime User Jan 29, 2012 #1 You can save a custom type just fine, but loading it won't work. I get why, when saving it you're passing the variable so it can enumerate the methods, but when loading it you're not passing the variable. Could you make a sub to load data from a map, where we pass the destination variable to the sub so it can enumerate through the methods? So this will work: Code: type testype(Test as int, Test2 as int) dim Settings as map, temp as int Settings.initialize temp.initialize Settings.Put("Test", temp) Settings.Load("Test", temp) Last edited: Jan 30, 2012
You can save a custom type just fine, but loading it won't work. I get why, when saving it you're passing the variable so it can enumerate the methods, but when loading it you're not passing the variable. Could you make a sub to load data from a map, where we pass the destination variable to the sub so it can enumerate through the methods? So this will work: Code: type testype(Test as int, Test2 as int) dim Settings as map, temp as int Settings.initialize temp.initialize Settings.Put("Test", temp) Settings.Load("Test", temp)
thedesolatesoul Expert Licensed User Longtime User Jan 29, 2012 #2 There is something wrong with the code you posted. You have not named your type (thus have not used it anywhere) Upvote 0
There is something wrong with the code you posted. You have not named your type (thus have not used it anywhere)
Erel B4X founder Staff member Licensed User Longtime User Jan 30, 2012 #3 Do you mean File.ReadMap? There is no method named Map.Load. Upvote 0
NeoTechni Well-Known Member Licensed User Longtime User Jan 30, 2012 #4 Erel said: Do you mean File.ReadMap? There is no method named Map.Load. Click to expand... Cause I made load up as an example Upvote 0
Erel said: Do you mean File.ReadMap? There is no method named Map.Load. Click to expand... Cause I made load up as an example