hookshy Well-Known Member Licensed User Longtime User Jul 16, 2015 #1 I have a process variable Code: Copy dim pipecolor as paint pipecolor= fx.Colors.Blue and I face sometimes the problem when using its variable like object should be first initialised paint ...on this line : lbl(newindex).TextColor=pipecolor when I try to fix this with : Code: Copy If pipecolor.IsInitialized=False Then pipecolor=fx.Colors.Blue End If I get null pointer exception error ... How should I handle this paint object to skip initialisation errors ?
I have a process variable Code: Copy dim pipecolor as paint pipecolor= fx.Colors.Blue and I face sometimes the problem when using its variable like object should be first initialised paint ...on this line : lbl(newindex).TextColor=pipecolor when I try to fix this with : Code: Copy If pipecolor.IsInitialized=False Then pipecolor=fx.Colors.Blue End If I get null pointer exception error ... How should I handle this paint object to skip initialisation errors ?
R Roycefer Well-Known Member Licensed User Longtime User Jul 16, 2015 #2 I've run into that problem, too. I think the best solution is to store your "color" variables as Ints, as follows: Code: Copy Dim pipecolor As Int = fx.Colors.To32Bit(fx.Colors.Blue) and then when you want to set a color of something, use: Code: Copy fx.Colors.From32Bit(pipecolor) Upvote 0
I've run into that problem, too. I think the best solution is to store your "color" variables as Ints, as follows: Code: Copy Dim pipecolor As Int = fx.Colors.To32Bit(fx.Colors.Blue) and then when you want to set a color of something, use: Code: Copy fx.Colors.From32Bit(pipecolor)
hookshy Well-Known Member Licensed User Longtime User Jul 16, 2015 #3 Sometimes it feels like I have to pass the see , but thanks guys ...when did you had time to learn so much Thank you Upvote 0
Sometimes it feels like I have to pass the see , but thanks guys ...when did you had time to learn so much Thank you