Android Question ScrollView2d disappeared (Solved)

Shelby

Well-Known Member
Licensed 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: 293
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.

Shelby

Well-Known Member
Licensed User
OK,
Thanks for running it.
I did like you and the booklet suggested. I moved what seems to be the most likely correctly filled Addnl Libs folder into the B4X folder. Now I don't know what additional files should be in that folder. When I get the app functioning again I guess I'll delete all the additional addnl libs folders.
Still no luck on the running of the app. I don't get why the 2nd line of the Class_Globals sub still has the 2nd line with a squiggly pink error line. When I hover on that line it writes:
Unknown type: scrollview2d
Are you missing a library reference
** Below is a screenshot of my additional libraries
 

Attachments

  • Addnl Libs Screenshot.png
    Addnl Libs Screenshot.png
    116.6 KB · Views: 184
Last edited:
Upvote 0

Shelby

Well-Known Member
Licensed User
Horrible News:
I have just tested positive for Covid-19. I thought I had a slow cold coming on since Sunday. I'll continue checking here periodically to see if you have any more suggestions to remedy my IDE problem.
Thanks again, all of you.
Shelby
 
Last edited:
Upvote 0

Shelby

Well-Known Member
Licensed User
Hi Again Kaus,
I was under the misconception that a new additional libraries folder needed to be produced for each additional project. In the last week you made me aware that apparently, this additional libraries folder can be used for unlimited numbers of projects. I had read the basic language booklet you pointed out to me above but that was over a year ago and it didn't have much impact on me until you directed me back to it here. Now that I have that folder properly placed in the B4X folder I still don't have the ability to run my project even though you said runs OK for you.
At least the ScrollView2D library is shown in my library list on the IDE and I of course checked it.
I'm now trying to understand if I have too many or not enough items in my Files Manager. Now my IDE tells me that there is an unknown type: touchpanelcreator. I have no such wording in my app's IDE so it's perplexing. I'll try the search here in the forum for that touchpanelcreator.
My Covid symptoms are 80% reduced after Vit D, Zinc and Vit C for 3 days now (prescribed by my doctor).
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
From your screenshot, the AdditionalLibraries folder is not what I suggested you !?
What kind of ScrollView2D file did you copy into the B4X\AdditionalLibraries folder.
You should copy the two files ScrollView2D.jar and ScrollView2D.xml files into the B4X\AdditionalLibraries\B4A folder.

Then, touchpanelcreator belongs to the ViewsEx library and has nothing to do with ScrollView2D.
There is nothing in the project you posted in post #19 concerning the ViewsEx library.
So, what did you change or add ?
Your project, in post #19, does it work or not ?
Because you say that ScrollView2D is referenced in the IDE Libraries Manager.
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Here's the newest Addnl Libs folder screenshot. Maybe you can tell me what to remove. I have the two items you mentioned. I still don't see where touchpanelcreator wording came from . I think all my projects won't compile now. (I was wrong, my two published apps compile ok now. Also here's my libraries manager Screenshot. I was guessing some libraries that might help my dilemma. Maybe the XUI and XUI Views are the bandits. Crap- I can't get the libs mgr in the screenshot. In it, I have checked: Core, Reflection, RuntimePermissions, ScrollView2D, SQL, StringUtils, and as I mentioned, XUI and XUI Views.
 

Attachments

  • Libs Tab.png
    Libs Tab.png
    160.1 KB · Views: 180
  • Untitled.png
    Untitled.png
    63.5 KB · Views: 162
Last edited:
Upvote 0

klaus

Expert
Licensed User
Longtime User
It is very frustrating trying to help you.
In post #16 I suggested you the recommended structure for the additional libraries.
You have not done it, why ?
Then in post #24 I told you that you have not made the structure as recommended, but you have not changed it, why?
In the same post I asked you what type of file is ScrollView2D, you have not answered this question, why?
You were suggested to copy these two files ScrollView2D.jar and ScrollView2D.xml in the AdditionalLibraries folder, it seems that you have not done this either.
You must carefully read chapter 5.9.2 Additional libraries or even then entire Libraries chapter in the B4X Basic language booklet, as also already suggested in post #16.
Sorry, but I cannot help you if do not want to help us in following our suggestions and answering our questions.
 
Last edited:
Upvote 0

Shelby

Well-Known Member
Licensed User
I only colored my answers for your ease of seeing them.

In post #16 I suggested you the recommended structure for the additional libraries. You have not done it, why ? As far as I can tell, I did those things, and I told you in post 23. Now as I look at the image you showed in post 16, I see that you put your folder on a drive D. I didn't notice & take the time to build a new drive D. Am I to do that? (Make a new drive?) Here's my path configuration: C:\Users\Shelby\Desktop\B4x\Additional Libraries. What is incorrect about it?
Then in post #24 I told you that you have not made the structure as recommended, but you have not changed it, why? I have no idea what you say is wrongly changed. By structure do you mean the configuration pathway?
In the same post I asked you what type of file is ScrollView2D, you have not answered this question, why? That's one of my problems: I don't know what type of file it is. I think it's a library; now that that library has finally (for reasons not clearly known) popped up into my Libraries Manager tab (where I clicked it), the IDE logs no longer asks me for the type. Even now my IDE has the following line underscored with a squiggly pink line:
Private SV As ScrollView2D (I don't know why)

You were suggested to copy these two files ScrollView2D.jar and ScrollView2D.xml in the AdditionalLibraries folder, it seems that have not done this either. In post 25 I showed the image of my Addnl libs folder where those two files are indeed placed into it. Whoops, now I see that the XML and Jar files are not correct. I'll look for the correct ones and replace them in place of the incorrect dialogue ones.
Here's the new list of items in the folder: (Screenshot)

SS
 

Attachments

  • Addnl Libs Screenshot 10 2 21.png
    Addnl Libs Screenshot 10 2 21.png
    5.8 KB · Views: 178
Last edited:
Upvote 0

klaus

Expert
Licensed User
Longtime User
This location could be good: C:\Users\Shelby\Desktop\B4x\Additional Libraries.
But you did not add the four subfolders as suggested.

1633180731857.png


You could probably leave your AdditionalLibraries folder as it is, without the recommended sub-structure above.
In the screenshot of your AdditionalLibraries folder there is only one ScrollView2D file.
It seems to be a B4XLibrary, I do not know where you got this one from ?
Download the ScrollView2D v1.3zip file from this thread: [Lib] ScrollView2D, the left one.
Unzip it and copy these the two files ScrollView2D.jar and ScrollView2D.xml into your AdditionalLibraries folder.

To know a file type you may select, in the files browser, to display the file extensions.
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Thanks, I'll do those things. Moments ago as I was reading the folders section of the Basic Language booklet I found that the scrollview2d file seems to be of the type: Activity Object (not that it clearly states it) here:
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Unknown type touchpanelcreator is still displayed in my logs tab even before I try to compile.
Also, this when I compile:

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
To know a file type you may select, in the files browser, to display the file extensions.

By files browser, do you mean the files manager tab in the IDE?
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Yes, I downloaded the zip file (informatix), I extracted the two files you mentioned, placed them in my addnl Libs folder and removed the old ones from my files tab in the IDE, then added the new ones to that tab (files mgr).
You didn't say it above but perhaps I should remove the B4Xlib file.
 
Last edited:
Upvote 0

klaus

Expert
Licensed User
Longtime User
Sorry but I do not understand what exactly you have done.
In your AdditionLibraries folder copy the two files and remove the ScrollView2D.b4xlib file.
Then, either right click in the Libraries Manager in the IDE to Refresh the libraries or exit the IDE and restart it.
Then you should see the ScrollView2D in your Libraries Manager in the IDE and select it.
Then everything should work, at least the project you posted in post #19.
 
Upvote 0

Shelby

Well-Known Member
Licensed User
I'm getting really close now. I removed the B4Xlibs file and all looked good until compiling. Error message:
B4A Version: 11.00
Parsing code. Error
Error parsing program.
Error description: Unknown type: reflector
Are you missing a library reference?
Error occurred on line: 831 (Table)
Dim ref As Reflector

Here's the area of code:
Lines 827 throu 839 in Table module:
    SetPadding(L, 8dip, 2dip, 4dip, 2dip)  'SSS changed 4dip on left entry to 8dip

        ' added by nir, make each label single line
        If cSingleLine Then
            Dim ref As Reflector
            ref.Target = L
            ref.RunMethod2("setSingleLine", True, "java.lang.boolean")
        End If
        L.Tag = rc
        lbls(i) = L
    Next
    Return lbls
End Sub

So that prompted me to check the reflector library in the Library Manager and now all is well, except that a new problem has arisen. Some kind of floating decimal, when I click on my last column header, and the app disappears from my Android S9. The other column headers work properly.

I solved it by adding a file called dbirc.11.db-journal back into my files folder in the project.
 
Last edited:
Upvote 0

Shelby

Well-Known Member
Licensed User
Thanks for your patience Klaus. I'd love to donate $100 to your bank account but you said no before. Change your mind if you wish.
I'm suffering greatly here at my Corona party. I thought I was getting better 2 days ago. Now miserable again. My wife and I had the 2 vaccinations (Pfizer) 6 months ago but bad luck has hit. I've been this sick before but it was decades ago.
By the way, strangely the squiggly line is still as I mentioned above although the app seems to compile ok. I'll keep trying to make the squiggy boy disappear.
 
Upvote 0

Mahares

Expert
Licensed User
Longtime User
Some kind of floating decimal, when I click on my last column header, and the app disappears from my Android S9
The reason you got the crash is because you have one record in the table that has a blank PgPDF column. which makes the app crash because it is expecting to sort by numbers and the blank data in PgPDF is not a number.
You can run this query to check it out: Put this query right at the end of Activity_Create You will see that it has the DescriptionSubjectLookup showing the word Test.
B4X:
Dim strQuery As String = "Select * from TableList221 ORDER BY PgPDF LIMIT 1"
    Dim rs As ResultSet =Starter.sql.ExecQuery(strQuery)
    Log("--------")
    Do While rs.NextRow
        Log(rs.GetString("DescriptionSubjectLookup") & TAB & rs.GetString("TableNumber")& TAB & rs.GetString("PageIRC"))
    Loop
    rs.close

If you want to delete that record, you can put the below query right after you initialize the database in Sub Activity_Create(FirstTime As Boolean). Once the record is deleted, you can then run your query that was giving you trouble and you will be able to sort by the last column without the crash.
B4X:
Starter.sql.ExecNonQuery2("DELETE FROM TableList221 WHERE DescriptionSubjectLookup LIKE ?", Array As String("Test%"))
klaus is doing a great job helping you and demonstrating a tremendous patience. That is typical of him. If you would rather wait for klaus to give you the instructions, maybe klaus can test it for himself first so he can be sure. I will let klaus resume his help to you now. Have a good night
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Thanks Mahare,
I knew I had an almost empty record and shortly after I complained about the problem, I removed the record with my DB Browser. That worked just as you suggested with the query method. Thanks for your assistance.
 
Upvote 0
Top