B4J Question Problems with B4XPages

Andromeda

Member
Licensed User
Longtime User
Good morning,

i try to fiddle with the example SqlLight2.

My first idea is to move the SqlTable onto another Page (from MainPage to "CustomerPage")
and implement a drawer to access different pages later (only CustomerBtn is ctive now)
This seems pretty good. But when i try to "Add" or "Edit" another entry on the new CustomerPage and use the Page "PageEdit"
in Add or Edit Mode it throws an exception about "initializing".
This page wants to have the RowId that was formerly choosen on the MainPage. But i moved it onto the Customer page and it seems that i cant access the RowId or the full SQL-Entry.

Maybe my example is totally faulty?

Or i have mixed "normal" pages and B4XPages?

Maybe someone can throw me a hint what is going wrong here?
 

Attachments

  • B4XPages_SQLiteLight2.zip
    290.5 KB · Views: 93

LucaMs

Expert
Licensed User
Longtime User
PageEdit, line 85:
B4X:
RowID = B4XPages.MainPage.RowIDList.Get(EntryIndex)        'get the ID for the given entry index

B4XPages.MainPage.RowIDList is not initialized (place the editor cursors on RowIDList and press F7 to see where it is used).


[Note that it is technically wrong to use RowID]
 
Last edited:
Upvote 0

Andromeda

Member
Licensed User
Longtime User
Thanks for your hint.
Changed the occurence of Mainpage to Mainpage.Customer and it works again.

I just take the example program. You said "RowId is technically wrong".....Its just the example from here.
But what should i use instead?
 
Upvote 0
Top