Android Question ScrollView2d disappeared (Solved)

Shelby

Well-Known Member
Licensed User
Longtime User
Hi All,
In my SQLite db app, suddenly the DB shows the following error message when I run it :

[CODE
B4A Version: 11.00
Parsing code. Error
Error parsing program.
Error description: Unknown type: scrollview2d
Are you missing a library reference?
Error occurred on line: 231 (Table)
Private SV As ScrollView2D
[/CODE]
I don't know how to make the type known or why anything changed. Here's my app zipped. Can you see the problem?

Thanks
 

Attachments

  • SS2021V11.zip
    53.7 KB · Views: 435
Last edited:
Solution
Thanks for your patience Klaus. I'd love to donate $100 to your bank account but you said no before.
Thank you for your proposal, but my mind has not changed it is still and will remain no thank you.

I have updated the Table class to version 3.30 including a check that all values in the column to sort are valid numbers for numeric sorting.

Attached you find a modified version with the latest Table Version.
In your project you used version 2.19, the latest version now is 3.30, lot of things had changed in the mean time.
I also removed the wrong line in your database.

Mahares

Expert
Licensed User
Longtime User
I don't know how to make the type known or why anything changed.
Shelby:
Are you looking for version 1.30. Here is a link. When you unzip the file, you should have a jar file and an xml file, that need to be in the additional libraries folder
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
No change so far; any chance that there should be nothing more in that Additional Libraries folder? I have a mess in there with all the attempts I made today to straighten it out.
Well, I just did as I suggested. I renamed my old Addnl Libs folder and have a new empty except for those two files you suggested in the new Additional Libraries Folder. I'm exiting out of the ide and restarting it.....Same error: Unknown type: scrollview2d.
This is the line in the table module that is unhappy: Private SV As ScrollView2D. It's in the Sub Class_Globals. Next I added the following attached library file into the Addnl Libs folder. Also no help. Now I only have those three items in the folder.
 

Attachments

  • scrollview2d.b4xlib
    3.4 KB · Views: 296
Last edited:
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
Do you see the lib in the libs tab at the right side of the screen in B4A? If you do and it is checked uncheck it -> save the project -> close B4a -> open B4a -> open project -> click on the lib and check the checkbox. Let us know how did it go?
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
Do you see the lib in the libs tab at the right side of the screen in B4A? If you do and it is checked uncheck it -> save the project -> close B4a -> open B4a -> open project -> click on the lib and check the checkbox. Let us know how did it go?
No, it's not in the libraries manager tab in the IDE. I thought it used to be but I'm not sure now. I even put it into the files manager area; maybe I should remove it from there?
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
Check the Configure paths option in the tools menu and make sure that the jar is in what is written in the Additional libraries.
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
Check the Configure paths option in the tools menu and make sure that the jar is in what is written in the Additional libraries.
Thanks,
I'll try that; I did it once today but hopefully I've reached a new point where it will succeed. I just did it for the additional libraries; now I'll try for the .jar file
 
Upvote 0

hatzisn

Expert
Licensed User
Longtime User
It can be also I suppose the b4xlib
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
The .jar file is in C:\Android\platforms\android-30\android.jar where it has been for a long time. The browse button couldn't see anything in the addtnl libs folder.
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
I have many b4x libraries in the IDE tab like: B4X table, b4x pages, plus 7 more. I'll try pages
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
I have many b4x libraries in the IDE tab like: B4X table, b4x pages, plus 7 more. I'll try pages: didn't help. Just tried B4X table: didn't help. I unchecked the pages before checking table and shut down the IDE each time.
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
To let you know I have B4A 11.0, here's the error message when I try to run:
B4A Version: 11.00
Parsing code. Error
Error parsing program.
Error description: Unknown type: scrollview2d
Are you missing a library reference?
Error occurred on line: 231 (Table)
Private SV As ScrollView2D
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
I wonder if I should add a new field to my db in the db browser and then try the IDE afterward. I tried it; no help.
 
Last edited:
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
Here's the code for initializing the table. There are so many instances of the object (I guess it's an object) sv.

Initialize Table:
Private Sub InitTable
    Data.Initialize
    visibleRows.Initialize
   
    pnlTable.Tag = "Table"
    TableObject = Me
   
    [COLOR=rgb(84, 172, 210)]SV[/COLOR].Initialize(0, 0, "[COLOR=rgb(84, 172, 210)]SV[/COLOR]")
    internalPanel.Initialize("IP")
    innerClearAll(mNumberOfColumns)

    [COLOR=rgb(84, 172, 210)]SV[/COLOR].Panel.Color = cTableColor
    IsVisible = True
    Header.Initialize("")
    Header.Color = cTableColor
   
    pnlTable.AddView(Header, 0, 0 , cWidth, cHeaderHeight)
   
    ' add status line
    lblStatusLine.Initialize("")
    lblStatusLine.Color = Colors.Transparent ' is it really ?
    internalPanel.Color = Colors.Transparent 'TODO uncomment this
    If (cShowStatusLine = True) Then
        pnlTable.AddView([COLOR=rgb(84, 172, 210)]SV[/COLOR], 0, Header.Height, cWidth, cHeight - Header.Height - cRowHeight)
        pnlTable.AddView(lblStatusLine,0, [COLOR=rgb(84, 172, 210)]SV[/COLOR].Top + [COLOR=rgb(84, 172, 210)]SV[/COLOR].Height, cWidth, cRowHeight)
    Else
        pnlTable.AddView([COLOR=rgb(84, 172, 210)]SV[/COLOR], 0, Header.Height, cWidth, cHeight - Header.Height)
        pnlTable.AddView(lblStatusLine,0, [COLOR=rgb(84, 172, 210)]SV[/COLOR].Top + [COLOR=rgb(84, 172, 210)]SV[/COLOR].Height, 0, 0)
    End If
    pnlTable.AddView(internalPanel, 0, 0, cWidth, 0)
    updateIPLocation

    Dim ColumnWidths(mNumberOfColumns) As Int
    Dim HeaderWidths(mNumberOfColumns) As Int
    Dim DataWidths(mNumberOfColumns) As Int
    Dim SavedWidths(mNumberOfColumns) As Int
    Dim cColumnDataType(mNumberOfColumns) As String
    For i = 0 To mNumberOfColumns - 1
        ColumnWidths(i) = [COLOR=rgb(84, 172, 210)]SV[/COLOR].Width / mNumberOfColumns
        HeaderWidths(i) = ColumnWidths(i)
        DataWidths(i) = ColumnWidths(i)
        SavedWidths(i) = ColumnWidths(i)
        cColumnDataType(i) = "TEXT"
    Next
    [COLOR=rgb(84, 172, 210)]SV[/COLOR].Panel.Width = [COLOR=rgb(84, 172, 210)]SV[/COLOR].Width
    [COLOR=rgb(84, 172, 210)]SV[/COLOR]_ScrollChanged(0, 0)
    If (lblStatusLine.IsInitialized And enableStatusLineAutoFill=True) Then setStatusLine(Data.Size & " rows") ' should this be automatic ?

    sortingView.Initialize("")
   
    ' used for string width measuements in the LoadSQLiteDB routine
    bmp.InitializeMutable(2dip, 2dip)
    cvs.Initialize2(bmp)
End Sub

Goodnight, it's 10:10 pm here in San Diego.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
The code you show is an old version of the Table class.
The Table class needs the ScorllView2D library.
You say that you have the two ScrollView2D.jar and ScrollView2D.xml files.
These two files must be in your AdditionalLibraries folder like the other additional librariers.
In the IDE, in the menu Tools Configure paths you must set the correct AdditionalLibraries folder.



D:\B4X\AdditionalLibraries in my case.

The recommended structure of the AdditionalLibraries folder is this:



One folder for each platform.

You may have a look HERE.
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
Not knowing better, I have 8 instances of additional libraries folders. I put a seemingly older instance of the folder into the IDE (with the configure paths tool) but I still have the same error, and each time I bring up the IDE I can see a red squiggly line under the second line in my Class_Globals Sub. I guess I'll look into all those adnl libs folders and see if there is one that looks most likely to work for me.
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
I have tried 2 of the several addnl libs folders and each has only the scrollview2d XML file and the scrollview2d .jar file. Still I get:
B4A Version: 11.00
Parsing code. Error
Error parsing program.
Error description: Unknown type: scrollview2d
Are you missing a library reference?
Error occurred on line: 231 (Table)
Private SV As ScrollView2D
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
Here's my present project zipped in case you can spot something. In the mean time I'll keep viewing the other 6 addnl libs folders to see if anything looks different. I'm wondering if I should also have a copy of the actual ScrollView2d library within the folder. I just found a jetifier.map file in one of the addnl libs folders. I suppose that's not useful.
P.S. Below, I just changed the project zip file after I moved the Addnl Libs folder to the B4X folder for simplicity and to follow Klaus.
 

Attachments

  • SS2021V11.zip
    73.7 KB · Views: 256
Last edited:
Upvote 0

klaus

Expert
Licensed User
Longtime User
Your project works here.
The only step I needed to make is to check the ScrollView2D library in the Libraries Manager.



Why do you have so many different AdditionalLibraries folders?
Make a structure as explained in the B4X Basic Language booklet.
Put all additional libraries in the correct platform folders and everything should work without trouble.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…