B4J Question [Solved] Error logging int

Daestrum

Expert
Licensed User
Longtime User
I am receiving this error (not sure if to post here or in bugs/wish)

src\b4j\example\main.java:88: error: incompatible types: int cannot be converted to String
anywheresoftware.b4a.keywords.Common.Log(_decompiler.decompileToDir("c:/temp/src4decomp/bindertest.jar","c:/temp/testdecomp"));

The routine returns an int (not Integer)
B4X:
Log(decompiler.decompileToDir("c:/temp/src4decomp/bindertest.jar","c:/temp/testdecomp"))

I can work round it by changing the code to
B4X:
Log(""&decompiler.decompileToDir("c:/temp/src4decomp/bindertest.jar","c:/temp/testdecomp"))
the xml def for this routine is
B4X:
  <method>
   <name DesignerName="decompile_1">decompile</name>
   <comment>generated</comment>
   <returntype>int</returntype>
   <parameter>
    <name>jarPath</name>
    <type>java.lang.String</type>
   </parameter>
   <parameter>
    <name>outDir</name>
    <type>java.lang.String</type>
   </parameter>
  </method>
 

Daestrum

Expert
Licensed User
Longtime User
I can upload the .xml

The jar is the original jd-core.jar I have made no changes to it nor have I wrapped it.

This error may be of my own making as the xml is generated from the jar, but looking at the jar source code , it does return an int.
 

Attachments

  • jd-core.zip
    916 bytes · Views: 190
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
Thanks for looking, back to the drawing board for generating xml directly from the jar.
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
I put my hands up to this one, in the xml I had <returntype> string, but it was returning an int.
Sorry.....
I will sit on the naughty step for 30 minutes.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…