- Jun 6, 2020
- 11,559
- 4,422
I'm reading values from the KeyValueStore. When the value returns null it seems impossible to test for in a way that seems intuitive.
i.e. the following does not work and the value continues to be null:
B4X:
In both cases deviceID remains as null
I know it can be solved in the following way:
B4X:
..but this seems long and just 'feels' wrong..
Is there an alternative way? Maybe a solution would be a method that passes a default value that is returned if the kvs value was null?
i.e. the following does not work and the value continues to be null:
B4X:
کد:
محتوای بلوک کدها در دسترس شما نیست. برای مشاهده بلوک کدها، وارد انجمن شوید یاثبت نام کنید
I know it can be solved in the following way:
B4X:
کد:
محتوای بلوک کدها در دسترس شما نیست. برای مشاهده بلوک کدها، وارد انجمن شوید یاثبت نام کنید
..but this seems long and just 'feels' wrong..
Is there an alternative way? Maybe a solution would be a method that passes a default value that is returned if the kvs value was null?
برای دیدن لینک ها باید ثبت نام کنید