Hello everybody!
It's me again and I have (well what else *g*) a problem :sign0085:
I am currently trying to use the great door-library to raise some events when I click into a, for this example, textbox.
This is the code which works perfectly all right on the desktop:
So that works perfectly on the desktop... I click into the textBox and
my Sub "doHotSpotCheck" gets called and displays an AlertBox.
BUT here comes the problem:
On the device I get directly when I start my app an error:
"An error occured on sub _main_app_start.
NullReferenceException
Continue?"
Ok then I thought the "MouseClick" might be the problem, so I changed it to:
Now the program starts and when I change the text in the textbox, I get
this (same) error:
"An error occured on sub _main_eventhotspotfilllevelclick_newevent.
NullReferenceException
Continue?"
The problem seems to be this command
"objectHotSpotFillLevelClick.GetProperty("X")", as when I comment it out
I get no error (of course I also commented out the second line where this command occurs for the "Y"-value).
So I would really be very happy if anybody could help me:
- why do I get this error when I have "MouseClick" enabled?
- why do I still get an error when I jump into the event?
As I said before that all works perfectly well on the desktop! :sign0085:
Thanks a lot in advance for any help
Best regards,
Chris
It's me again and I have (well what else *g*) a problem :sign0085:
I am currently trying to use the great door-library to raise some events when I click into a, for this example, textbox.
This is the code which works perfectly all right on the desktop:
B4X:
Sub App_Start
...
objectHotSpotFillLevelClick.New1(False)
objectHotSpotFillLevelClick.FromControl("textBoxFillLevel")
eventHotSpotFillLevelClick.New1(objectHotSpotFillLevelClick.value,"MouseClick")
...
End Sub
Sub eventHotSpotFillLevelClick_NewEvent
objectHotSpotFillLevelClick.value = eventHotSpotFillLevelClick.Data
x = objectHotSpotFillLevelClick.GetProperty("X")
y = objectHotSpotFillLevelClick.GetProperty("Y")
CallSub ("doHotSpotCheck", "fillLevel", x, y)
End Sub
So that works perfectly on the desktop... I click into the textBox and
my Sub "doHotSpotCheck" gets called and displays an AlertBox.
BUT here comes the problem:
On the device I get directly when I start my app an error:
"An error occured on sub _main_app_start.
NullReferenceException
Continue?"
Ok then I thought the "MouseClick" might be the problem, so I changed it to:
B4X:
objectHotSpotFillLevelClick.New1(False)
objectHotSpotFillLevelClick.FromControl("textBoxFillLevel")
eventHotSpotFillLevelClick.New1(objectHotSpotFillLevelClick.value,"TextChanged")
Now the program starts and when I change the text in the textbox, I get
this (same) error:
"An error occured on sub _main_eventhotspotfilllevelclick_newevent.
NullReferenceException
Continue?"
The problem seems to be this command
"objectHotSpotFillLevelClick.GetProperty("X")", as when I comment it out
I get no error (of course I also commented out the second line where this command occurs for the "Y"-value).
So I would really be very happy if anybody could help me:
- why do I get this error when I have "MouseClick" enabled?
- why do I still get an error when I jump into the event?
As I said before that all works perfectly well on the desktop! :sign0085:
Thanks a lot in advance for any help
Best regards,
Chris