F FabioG Active Member Licensed User Longtime User Jun 12, 2016 #1 Hello, I have a problem I need to do this Code: Copy Type AppSettings(ID As Int,IsDefault As Boolean,Model As String,LogEvent As List) Dim Config as AppSettings Config.LogEvent.Inizialize Config.LogEvent.Add("Test1") but I get this error message Code: Copy java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference how can I fix this? Thanks!
Hello, I have a problem I need to do this Code: Copy Type AppSettings(ID As Int,IsDefault As Boolean,Model As String,LogEvent As List) Dim Config as AppSettings Config.LogEvent.Inizialize Config.LogEvent.Add("Test1") but I get this error message Code: Copy java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference how can I fix this? Thanks!
DonManfred Expert Licensed User Longtime User Jun 12, 2016 #2 Code: Copy Dim Config As AppSettings Config.Initialize Dim l As List l.Initialize l.Add("Item1") l.Add("Item2") Config.LogEvent = l Upvote 0
Code: Copy Dim Config As AppSettings Config.Initialize Dim l As List l.Initialize l.Add("Item1") l.Add("Item2") Config.LogEvent = l
F FabioG Active Member Licensed User Longtime User Jun 12, 2016 #3 DonManfred said: Code: Copy Dim Config As AppSettings Config.Initialize Dim l As List l.Initialize l.Add("Item1") l.Add("Item2") Config.LogEvent = l Click to expand... thanks for your fast reply but it don't work Code: Copy Config.Initialize I tired Code: Copy Config.LogEvent.Inizialize Dim l AsList l.Initialize l.Add("Item1") l.Add("Item2") Config.LogEvent = l but I get the same error any ideas ? Thanks Upvote 0
DonManfred said: Code: Copy Dim Config As AppSettings Config.Initialize Dim l As List l.Initialize l.Add("Item1") l.Add("Item2") Config.LogEvent = l Click to expand... thanks for your fast reply but it don't work Code: Copy Config.Initialize I tired Code: Copy Config.LogEvent.Inizialize Dim l AsList l.Initialize l.Add("Item1") l.Add("Item2") Config.LogEvent = l but I get the same error any ideas ? Thanks
DonManfred Expert Licensed User Longtime User Jun 12, 2016 #4 i tried my code above and it works. You need to initialize the type first. (see my code) you can't use initialize on one of the typevalues. Instead you should create a list by yourself and add the list to the fieldvalue (see my code again) Upvote 0
i tried my code above and it works. You need to initialize the type first. (see my code) you can't use initialize on one of the typevalues. Instead you should create a list by yourself and add the list to the fieldvalue (see my code again)
F FabioG Active Member Licensed User Longtime User Jun 12, 2016 #5 DonManfred said: i tried my code above and it works. You need to initialize the type first. (see my code) you can't use initialize on one of the typevalues. Instead you should create a list by yourself and add the list to the fieldvalue (see my code again) Click to expand... I'm sorry yes, it works, thank you, I had forgotten to initialize This will erase the previous contents of the list any ideas to add to the previous contents? Upvote 0
DonManfred said: i tried my code above and it works. You need to initialize the type first. (see my code) you can't use initialize on one of the typevalues. Instead you should create a list by yourself and add the list to the fieldvalue (see my code again) Click to expand... I'm sorry yes, it works, thank you, I had forgotten to initialize This will erase the previous contents of the list any ideas to add to the previous contents?
DonManfred Expert Licensed User Longtime User Jun 12, 2016 #6 read the old LogEvent to a list, change the list, add the list replacing the old one Upvote 0
F FabioG Active Member Licensed User Longtime User Jun 12, 2016 #7 DonManfred said: read the old LogEvent to a list, change the list, add the list replacing the old one Click to expand... solved thanks! Upvote 0
DonManfred said: read the old LogEvent to a list, change the list, add the list replacing the old one Click to expand... solved thanks!