Android Question TouchPanelCreator (Solved)

Shelby

Well-Known Member
Licensed User
Longtime User
I installed a new hard drive, downloaded a new B4A 11.50 program, made sure the pathways are correct, and so on. My project will now not compile with the error message:

B4A Version: 11.50
Parsing code. Error
Error parsing program.
Error description: Unknown type: touchpanelcreator
Are you missing a library reference?
Error occurred on line: 38 (XUIScrollView)
Dim tpc As TouchPanelCreator

I can't find any touchpanelcreator in my code, so where is it?
 

Attachments

  • SS2021B4X.zip
    197.2 KB · Views: 274

Shelby

Well-Known Member
Licensed User
Longtime User
are you using the latest version? Does it conflict with another library?
My ide B4X material is the latest version just downloaded in the last week. I'm guessing that there is some simple setting or configuration that is off.
I have no idea if there could be a conflict since my knowledge here is only at the upper beginner level; possibly lower intermediate but doubtfully so. I'll be looking at all the possible changes I could make with the various parts of the IDE and so on.
Thanks for your help thus far.
Shelb
In your SampleScrollView project there are only 3 libraries in the library tab: B4Xpages, Core, and X2. That's why I asked about the X2 library in my question above.

I just added scrollview2d to your project and still can not get it to compile.
 
Last edited:
Upvote 0

Sagenut

Expert
Licensed User
Longtime User
Have you tried the project in post #9 ?
There were other errors in the project in post #1, in the routines copying the DB from the Assets folder.
@klaus
Your project from Post #9 work flawlessy. ?
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
@Sagenut
Thank you for testing it.
Therefor I do not understand why it does not work when Shelby is testing it.
Again, I do not know nor understand what he is doing and how, there was already a similar thread some months ago.
After months of trying to understand the steps to set the pathway to my db here in the forum, I have come to the point of being forced to ask for the method and steps to understanding the process. Recently when my hard drive crashed and luckily I was able to transfer most of the folders and files via a couple of external hard drives, I found that my largest folder named B4X had all the sub folders within that folder lost. I do have an excel .csv file with all my SQLite headings and 443 images named. During the past 6 months or so, I have searched for the key to my understanding the ability to change images as needed. I have become somewhat of an expert at changing the information in the column headings, rows and so on using the DB Browser.
The one thing I have never learned is how to change the images and names of images within the container which relates to my db. For all this time, I have only been able to display 28 images out of the 443 that I have. My image container is saved with no problem in an image folder, but I don't understand how to tell my project how to locate that container. I vaguely remember learning how to use an Excel .csv file to build the remote or local db; other than that foggy memory I think I'm just getting close to identifying the code within my project that points to the images but I don't have that ability to manipulate yet.
Since yesterday at some point in our long discussion, I remember Sagenut saying "I have been able to compile the example project in the opening post.
Then I have a crash probably because I don't have the DB.
These are the libraries checked:............"
Due to my folder losses, I now think the setting of a new path to my images container is the answer to this riddle we've been trying to solve this weekend.
Thanks for your generous efforts to help me.
My best guess is that the answer might lie within the following code (from my B4XMainPage module) which points to items I don't know how to find or make anew.

DB minipulation:
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("Layout")
 
#If B4A
    Shared = rp.GetSafeDirDefaultExternal("")
#Else If B4J
    xui.SetDataFolder("SS2021B4X")
    Shared = xui.DefaultFolder
#Else
    Shared = xui.DefaultFolder
#End If
    File.MakeDir(Shared, "/Dbs/")
    File.MakeDir(Shared, "/Images")
    DBFileDir = Shared & "/Dbs/"

    ImagesDir = Shared & "/Images/"
'    ImagesDir = File.DirAssets    'you could eventually leave the images in the File.DirAssets folder.

    File.Delete(DBFileDir, DBFileName)    'can be used to reset the default database.
 
    Log(DBFileDir)
    Log(ImagesDir)
    If File.Exists(DBFileDir, DBFileName) = True Then
        Log("db file does not exist")
        File.Copy(File.DirAssets, DBFileName, DBFileDir, DBFileName)
        Log("db copied")
    Else
        Log("db file does exist")
    End If
 
    If File.Exists(ImagesDir, "R702.4.2.png") = False Then
        File.Copy(File.DirAssets, "R702.4.2.png", ImagesDir, "R702.4.2.png")    'ignore
    End If
 
    B4XPages.SetTitle(Me, "SS2021B4X")
    If sql.IsInitialized = False Then
        Try
            #If B4J
            sql.InitializeSQLite(DBFileDir, DBFileName,True)
            #Else
            sql.Initialize(DBFileDir, DBFileName,True)
            #End If
        Catch
            Log("DB Not Initialized")
            'CkUser
        End Try
    Else
  
    End If
 
    Dim resultset As ResultSet = sql.ExecQuery("SELECT name from sqlite_master where type='table'")
    Do While resultset.NextRow
        Log(resultset.Getstring("name"))
    Loop
    resultset.Close
 
    'xtblItems.LoadSQLiteDB(Starter.sql,"SELECT DescriptionSubjectLookup, TableNumber as [Table], PageIRC As [IRC Page], PgPDF As [PDF Page] FROM TableList221",True)
    'Above edited out with Klaus recommendation in forum 5.20.21 SSS
    xtblItems.SingleLine = False
    xtblItems.LoadSQLiteDB2(sql,"SELECT DescriptionSubjectLookup, TableNumber as [Table], PageIRC As [IRC Page], PgPDF As [PDF Page] FROM TableList221", False, Array As String("T", "T", "T", "I"))
    'Above added after Klaus forum recommendation 5.20.21 SSS

'    xtblItems.SetColumnsWidths(Array As Int(350dip, 150dip, 90dip, 75dip))
    xtblItems.SetColumnsWidths(Array As Int(250dip, 150dip, 90dip, 75dip))

End Sub

The following is the same as my project in post #1 but without the line 64 in the xTableLite module commented.
 

Attachments

  • Shelby's_Proj.zip
    203.5 KB · Views: 176
Last edited:
Upvote 0

klaus

Expert
Licensed User
Longtime User
I still do not understand, why you insist with the project in post #1.
I sent you a modified version, in post #9, which works OK, and it works without problems for Sagenut.
So, I do not understand why does it not work for you !?
I cannot help further here.
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
Because neither of the two projects works for me. I explained above that the db has disappeared. I don't know how to set the path or construct a new db. Also, in your project and mine, there is no possible scrollview 2D library to check in the library tab although that library is in my Additional libraries folder. That's confusing too. I'll gladly use your project from now on. I didn't mean to be disrespectful.
 
Last edited:
Upvote 0

klaus

Expert
Licensed User
Longtime User
I explained above that the db has disappeared.
Why is it lost ?
A working database is included in your project !
My last suggestion:
1. Define a new folder.
2. Download the project from post #9 in this folder and unzip it.
3. Load the project from there into the IDE.
4. Uninstall your previous project from the device.
5. If you have any red comments in the Logs, this mean that your installation is wrong.
6. If you are seeing missing libraries, this could mean that you not have those and you need to download those in install them.
7. Run the program from the IDE. The program initializes the needed folders on the device and copies the database there.
8. What happens ?

This is my last post here.
 
Upvote 0

Sagenut

Expert
Licensed User
Longtime User
@Shelby
You need to repair your project/installation.
As @klaus said you should start from his project in post #9 and we will try to help you in solving the red errors in the log.
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
@Shelby
You need to repair your project/installation.
As @klaus said you should start from his project in post #9 and we will try to help you in solving the red errors in the log.
Right; performing his steps now.
Thanks
Hopefully I'll figure out what it means for me to install libraries as mentioned above in step # 6. I thought that after placing a library in a folder, it was automatically activated.
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
When I run the Klaus project, I get a message:
The following libraries are missing:
zoomimageview
scrollview2d
I see them in my Additional Libraries folder; from there I'm puzzled as to how to activate them or place them in the project files folder????
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Did you check Tools/Configure Path in order to verify that the Additional Libraries path following your new installation is the one you expect it to be?
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
Did you check Tools/Configure Path in order to verify that the Additional Libraries path following your new installation is the one you expect it to be?
I did that a few times yesterday and will check again now. Thanks
Shows this in configure paths window:
C:\Desktop\Projects\Additional Libraries
I just reset it using the browse button; I'll try the project again.
 
Last edited:
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
Halfway there. Now I'm getting the TouchPanelCreator error; I'll try adding the ViewsEx library; so far I can't find that library.
 
Last edited:
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
My red logs before compiling errors are: Unknown type: touchpanelcreator are you missing a library reference?

&
Unknown type: scrollview2d are you missing a library reference?
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
I'll try adding the ViewsEx library
No, no and NO.
Do not mess up the project !!!

Unknown type: touchpanelcreator are you missing a library reference?
The two people who have tested the project in post #9 have not seen this error !!!???

I am afraid that you have a big mess in your installation.
Create a new structure for the additional libraries:
C:\B4X\AdditionalLibraries\B4A
Copy all the additional libraries for B4A in this folder, this is valid for all projects.
Then, set C:\B4X\AdditionalLibraries as the Additional Libraries folder in the Path Configuration.
You can use the C: drive even though on my computer it is on the D: dive
Do NOT add \B4A at the end, the compiler knows where he has to search for.
All this is explained in detail in the B4X Language booklet.

1652029039131.png


Then you need to check these libraries in the IDE !
I had a short look at the last project you posted and have seen that these libraries were not checked.
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
No, no and NO.
Do not mess up the project !!!


The two people who have tested the project in post #9 have not seen this error !!!???

I am afraid that you have a big mess in your installation.
Create a new structure for the additional libraries:
C:\B4X\AdditionalLibraries\B4A
Copy all the additional libraries for B4A in this folder, this is valid for all projects.
Then, set C:\B4X\AdditionalLibraries as the Additional Libraries folder in the Path Configuration.
You can use the C: drive even though on my computer it is on the D: dive
Do NOT add \B4A at the end, the compiler knows where he has to search for.
All this is explained in detail in the B4X Language booklet.

View attachment 128977

Then you need to check these libraries in the IDE !
I had a short look at the last project you posted and have seen that these libraries were not checked.
OK, Thanks for not giving up. I'll perform you steps.
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
My additional libraries folder used to be in my B4X folder, but as I mentioned above, that is the folder which has been lost. I remade a new B4X folder with my new hard drive so due to your instructions, I'll put a new additional libraries folder in that new B4X folder, I guess and direct the configure paths operation to look there.
 
Upvote 0

Shelby

Well-Known Member
Licensed User
Longtime User
I also copied the ScrollView2D.jar file into the new Additional Libraries. Is that ok?
 
Upvote 0
Top