Bug? Is this an Intellisense bug?

agraham

Expert
Licensed User
Ok. That code was simplistic to show Intellisense, not to actually execute. This code doesn't show Intellisense.
B4X:
Dim i As ImageView
i.Initialize("")
i.Gravity  = Gravity_Center
Dim bmp As Bitmap = LoadBitmapResize(dirname, filename, i.Width, i.Height, True)
i.Bitmap = bmp
Dim pix As Int
pix = bmp. ' I could select GetPixel from the Intellisence shown here after typing period
pix = i.Bitmap. ' no Intellisense shown here after typing period so I have to type GetPixel myself :(
When I complete the code I get an unknown type error so I can see why the Intellisense doesn't show anything, but shouldn't this be valid code?
B4X:
...
i.Bitmap = bmp
Dim pix As Int
pix = bmp.GetPixel(0,0) ' no problem
pix = i.Bitmap.GetPixel(0,0) ' Unknown type: android.graphics.Bitmap
 

LucaMs

Expert
Licensed User
I know quite well what code is correct and what is not thank you. After half a century of practice I am getting quite good at it !
I know; I was just kidding, answering to your "question":
but shouldn't this be valid code?
:)


The worst thing is that it is not a bug of the Intellisense.
Another strange thing is that this code works, instead:
B4X:
Dim b As Bitmap = i.Bitmap
pix = b.GetPixel(0,0)
 
Top