Type problem with compile to library version 2.5

EduardoElias

Well-Known Member
Licensed User
Longtime User
I broke down my app in many libraries to be reusable. Very nice.

In the main activity I have choose the libraries that once were part of the application.

The source code is very long and complex.

I am getting this error:

Parsing code. 0.08
Compiling code. Error
Error compiling program.
Error description: Unknown type: yclientissuer._tcommand
Are you missing a library reference?
Occurred on line: 230
Select Job.JobName
Word: select

This is happening on the following select, on the first case:
B4X:
      Select Job.JobName
            Case FAppManager.Server.cCommand.GetPedido
             Select result
               Case 0 
...

where

B4X:
Private FAppManager As yAppManager

Public Sub Server As yClientIssuer
   Return FClientIssuer
End Sub

on the yClientIssuer I have declared:

B4X:
Sub Class_Globals
'types
   Type TQueryRecord (Command As String, message As Map, ToJSONMsg As List)
   Type TOnJobDone (Module As Object, Name As String)
   Type TCommand (login, logoff, putpedido, releasepedido, getpedido, getitem, getpedidos, getmapa, getlistaitens As String)

' consts
   Dim cCommand As TCommand
   cCommand.login = "login"
   cCommand.logoff = "logoff"
   cCommand.putpedido = "putpedido"
   cCommand.releasepedido = "releasepedido"
   cCommand.getpedido = "getpedido"
   cCommand.getitem = "getitem"
   cCommand.getpedidos = "getpedidos"
   cCommand.getmapa = "getmapa"
   cCommand.getlistaitens = "getlistaitens"


Explaining a little better:
Case FAppManager.Server.cCommand.GetPedido

FAppManager return a class object where is called the sub "server"

This server sub return another class object where the cCommand is defined as described above, as of type TCommand.

I made several changes and did not work. On the Library XML generated I see the type TCommand defined there.

This code was working fine before.

Any clue?

EDIT:
using the inline helper when typing the code, when i type FAppManager I get the list of members correctly,
FAppManager.Server also ok.
FAppManager.Server.cCommand is not displaying the list of members of the type defined.

EDIT:
I have made the same test with other Types defines on this library, and only one, the TCommand type is not working. I have also, changed the Type declaration to have the "as string" for each of member and it did not help. Changed the position etc.
Is is a reserved name?
 

Attachments

  • yclientissuer.zip
    19.6 KB · Views: 155
Last edited:

claudio

Member
Licensed User
Longtime User
I have a similar problem.

I declared a Type called QField into a Class_Globals sub of a class module,
when i try tu use it ouside of the lib i get the error:

B4X:
Parsing code.                           0.00
Compiling code.                         0.03
Compiling layouts code.                 0.00
Generating R file.                      0.17
Compiling generated Java code.          Error
B4A line: 32
q.Name = \
javac 1.6.0_32
src\b4a\example\main.java:234: Name is not public in cs.dblib.dbquery._qfield; cannot be accessed from outside package
_q.Name = "Test";
  ^
1 error

I attach the full project

Best regards and thanks for 2.5
 

Attachments

  • CSDBLib.zip
    31.3 KB · Views: 192
Upvote 0
Top