Z zabayin Member Licensed User Longtime User Jun 5, 2021 #1 I want to check Code Sample: If B4XImageView1.Bitmap = Null Then ' ---- code here End If Unfortunately .. i can't found this easy one. All I found methods are B4XImageView.Clear and not found solution in the forum. regards ....
I want to check Code Sample: If B4XImageView1.Bitmap = Null Then ' ---- code here End If Unfortunately .. i can't found this easy one. All I found methods are B4XImageView.Clear and not found solution in the forum. regards ....
Andris Active Member Licensed User Longtime User Jun 5, 2021 #2 zabayin said: I want to check Code Sample: If B4XImageView1.Bitmap = Null Then ' ---- code here End If Unfortunately .. i can't found this easy one. All I found methods are B4XImageView.Clear and not found solution in the forum. regards .... Click to expand... When loading bitmaps into image views, how about setting the .Tag property of each image view to True or False? Upvote 0
zabayin said: I want to check Code Sample: If B4XImageView1.Bitmap = Null Then ' ---- code here End If Unfortunately .. i can't found this easy one. All I found methods are B4XImageView.Clear and not found solution in the forum. regards .... Click to expand... When loading bitmaps into image views, how about setting the .Tag property of each image view to True or False?
Erel B4X founder Staff member Licensed User Longtime User Jun 6, 2021 #3 B4X: If B4XImageView1.Bitmap = Null OR B4XImageView1.Bitmap.IsInitialized = False Then Upvote 0
udg Expert Licensed User Longtime User Jun 7, 2021 #4 Shouldn't it be the other way around? First check for initialization and then for null? I'm basing this on the assumption that lazy evaluation's in place. Upvote 0
Shouldn't it be the other way around? First check for initialization and then for null? I'm basing this on the assumption that lazy evaluation's in place.
DonManfred Expert Licensed User Longtime User Jun 7, 2021 #5 udg said: Shouldn't it be the other way around? Click to expand... No. If the Bitmap is not set it is Null. You´ll get a Exception when trying to access the Bitmaps IsInitialized Method. Upvote 0
udg said: Shouldn't it be the other way around? Click to expand... No. If the Bitmap is not set it is Null. You´ll get a Exception when trying to access the Bitmaps IsInitialized Method.