I have a panel made in the designer. Attached to it are 9 ImageViews
In my code, I have subroutine the detects a click on one of the ImageViews. This works. But determining which ImageView is clicked results in an error, "Class Exception," and I don't know why:
B4X:
Sub pnlCameraEffect_Click
Dim cameraEffectChoice As ImageView
cameraEffectChoice = Sender
Select cameraEffectChoice.Tag
Case "0"
camera1.ColourEffect = "NONE"
pnlCameraEffect.Visible = False
Case "1"
camera1.ColourEffect = "AQUA"
pnlCameraEffect.Visible = False
Case "2"
camera1.ColourEffect = "BLACKBOARD"
pnlCameraEffect.Visible = False
Case "3"
camera1.ColourEffect = "MONO"
pnlCameraEffect.Visible = False
Case "4"
camera1.ColourEffect = "NEGITIVE"
pnlCameraEffect.Visible = False
Case "5"
camera1.ColourEffect = "POSTERIZE"
pnlCameraEffect.Visible = False
Case "6"
camera1.ColourEffect = "SEPIA"
pnlCameraEffect.Visible = False
Case "7"
camera1.ColourEffect = "SOLARIZE"
pnlCameraEffect.Visible = False
Case "8"
camera1.ColourEffect = "WHITEBOARD"
pnlCameraEffect.Visible = False
End Select
End Sub
In what line do you get the error and what is the exact message.
It would be much easier to help you if you posted your project as a zip file (IDE menu Files / Export As Zip).
from the name of the event, it might be that this is an event for the panel click (and NOT for the imageview click), hence the sender is a panel and you try to assign it to an imageview.