Android Question It crashes and i cannot see book cover (improved thread)

Enthousiastic

Active Member
Licensed User
Hello again , in my previous thread (it crashes and i cannot see the book cover image like flags example ) the error log text is as follows , what am I doing wrong , please help:


*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
main_b4xtable1_dataupdated (java line: 504)
java.lang.RuntimeException: Object should first be initialized (View).
at anywheresoftware.b4a.AbsObjectWrapper.getObject(AbsObjectWrapper.java:50)
at anywheresoftware.b4a.objects.B4XViewWrapper.GetView(B4XViewWrapper.java:298)
at b4a.example.main._b4xtable1_dataupdated(main.java:504)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:1068)
at anywheresoftware.b4a.keywords.Common.CallSubNew(Common.java:1015)
at b4a.example.b4xtable$ResumableSub_ImplUpdateDataFromQuery.resume(b4xtable.java:1675)
at anywheresoftware.b4a.keywords.Common$13.run(Common.java:1690)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
 

Attachments

  • RBBook.zip
    10.8 KB · Views: 106

MarkusR

Well-Known Member
Licensed User
view are the ui elements.
Object should first be initialized (View).
means u try access a view object but it is null (not initialized)
a view will be initialized if u used loadlayout, a file u made in the user interface designer.
or u created a object at runtime and forgot to call the obj.initialize method.
use the debug mode and break points.

in c# objects can be null and u need the new key word, in b4a u call initialize if u declared it by yourself.
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Firstly, don't post the same question in two different threads. Better to edit your original question if you want to make it clearer.

Second, is there data in the database? If not, your map object will be null.

- Colin .
 
Upvote 0

DonManfred

Expert
Licensed User
Upvote 0
Top