guys,
I need some help before I start beleveing to ghosts and get completely crazy. some time ago I opened a case
but despite some good tips from @udg I could not find the problem and since it was not urgent I just decided to postpone the analisys.
last week end I had some time and restarted the investigation but I found some even more unexplicable (for me at least) behaviors.
the intial evidence was (as described in the initial post) and still is, that I could/I cannot update the widget. so if I add a view (say a label) in the bal file and then in the widget service I call a rv.settext for that label the widget complains that the view does not exist issuing :
Widget ErrorNoSuchFieldException) java.lang.NoSuchFieldException: widgetservice_label1
so I thought...ok let's rename the bal file and update the rv = ConfigureHomeWidget("l1", "rv", 60, "My Widget") call. but I had the same result..
now the craziest thing: one of the worlking views in the widget is named "lblAlertsCounter" and it is referenced as such in the SetText code as rv.SetText("lblAlertsCounter","0"). so I opened the l1.bal layout file and renamed that label to "lblAlertsCounterx"..surprisigly the rv.SetText("lblAlertsCounter","0") still works...so now I am pretty sure:
the widget is using some other layout file and not the one I call in the rv = ConfigureHomeWidget("l1", "rv", 60, "My Widget").
What can I do to try to understand what is the widget using as layout file?
thanks for any suggestion..
I need some help before I start beleveing to ghosts and get completely crazy. some time ago I opened a case
Widget issue
Hi guys, I am getting crazy while trying to modify my app working widget. The widget is very simple and has been working for months. Now I am tryng to modifiy but whatever Views I add in the L1 layout if I try to SetVisibility in the code I get : Widget Error:(NoSuchFieldException)...
www.b4x.com
but despite some good tips from @udg I could not find the problem and since it was not urgent I just decided to postpone the analisys.
last week end I had some time and restarted the investigation but I found some even more unexplicable (for me at least) behaviors.
the intial evidence was (as described in the initial post) and still is, that I could/I cannot update the widget. so if I add a view (say a label) in the bal file and then in the widget service I call a rv.settext for that label the widget complains that the view does not exist issuing :
Widget ErrorNoSuchFieldException) java.lang.NoSuchFieldException: widgetservice_label1
so I thought...ok let's rename the bal file and update the rv = ConfigureHomeWidget("l1", "rv", 60, "My Widget") call. but I had the same result..
now the craziest thing: one of the worlking views in the widget is named "lblAlertsCounter" and it is referenced as such in the SetText code as rv.SetText("lblAlertsCounter","0"). so I opened the l1.bal layout file and renamed that label to "lblAlertsCounterx"..surprisigly the rv.SetText("lblAlertsCounter","0") still works...so now I am pretty sure:
the widget is using some other layout file and not the one I call in the rv = ConfigureHomeWidget("l1", "rv", 60, "My Widget").
What can I do to try to understand what is the widget using as layout file?
thanks for any suggestion..