giga Well-Known Member Licensed User Longtime User May 26, 2013 #1 I am working on a new SIP library and keep getting an error with this code. It is JAVA and maybe someone has seen this before. } public String toString(int arg0){ return this.siperrorcode.toString(int arg0) } error: unexpected type required:value found class Any help appreciated As always. THANKS,
I am working on a new SIP library and keep getting an error with this code. It is JAVA and maybe someone has seen this before. } public String toString(int arg0){ return this.siperrorcode.toString(int arg0) } error: unexpected type required:value found class Any help appreciated As always. THANKS,
agraham Expert Licensed User Longtime User May 26, 2013 #2 There is not enough code there to really even guess. It looks valid syntax as it stands. Upvote 0
giga Well-Known Member Licensed User Longtime User May 26, 2013 #3 Thanks agraham for the reply. This is the entire .java class The error occurs on the last line. "public String" package android.net.sip.sipErrorCode; import anywheresoftware.b4a.BA; import anywheresoftware.b4a.BA.Author; import anywheresoftware.b4a.BA.DependsOn; import anywheresoftware.b4a.BA.ShortName; import anywheresoftware.b4a.BA.Version; import android.net.sip.*; @ShortName("SipErrorCode") @Author("giga") @Version(1.0f) @DependsOn(values = { "android-9" }) public class SipErrorCode { private BA ba; private String eventName; private SipErrorCode siperrorcode; public void Initialize(final BA ba, String EventName) { this.ba = ba; this.eventName = EventName.toLowerCase(BA.cul); this.siperrorcode = new SipErrorCode(); } public SipErrorCode getSipErrorCode() { return this.siperrorcode; } public void setSipErrorCode(SipErrorCode siperrorcode) { this.siperrorcode = siperrorcode; } public String toString(int arg0){ return this.siperrorcode.toString(int arg0) } } Upvote 0
Thanks agraham for the reply. This is the entire .java class The error occurs on the last line. "public String" package android.net.sip.sipErrorCode; import anywheresoftware.b4a.BA; import anywheresoftware.b4a.BA.Author; import anywheresoftware.b4a.BA.DependsOn; import anywheresoftware.b4a.BA.ShortName; import anywheresoftware.b4a.BA.Version; import android.net.sip.*; @ShortName("SipErrorCode") @Author("giga") @Version(1.0f) @DependsOn(values = { "android-9" }) public class SipErrorCode { private BA ba; private String eventName; private SipErrorCode siperrorcode; public void Initialize(final BA ba, String EventName) { this.ba = ba; this.eventName = EventName.toLowerCase(BA.cul); this.siperrorcode = new SipErrorCode(); } public SipErrorCode getSipErrorCode() { return this.siperrorcode; } public void setSipErrorCode(SipErrorCode siperrorcode) { this.siperrorcode = siperrorcode; } public String toString(int arg0){ return this.siperrorcode.toString(int arg0) } }
agraham Expert Licensed User Longtime User May 26, 2013 #4 I don't understand that error you are getting, I get a "syntax error" public String toString(int arg0){ return this.siperrorcode.toString(int arg0) } Click to expand... Upvote 0
I don't understand that error you are getting, I get a "syntax error" public String toString(int arg0){ return this.siperrorcode.toString(int arg0) } Click to expand...
giga Well-Known Member Licensed User Longtime User May 26, 2013 #5 agraham said: I don't understand that error you are getting, I get a "syntax error" Click to expand... Yes I know, its strange. I am using eclipse Build: v21.0.1-543035 and i wonder if it is an eclipse bug?? I show int as red underline and the brackett after arg0 ) is also underlined.(int arg0) Thanks, Upvote 0
agraham said: I don't understand that error you are getting, I get a "syntax error" Click to expand... Yes I know, its strange. I am using eclipse Build: v21.0.1-543035 and i wonder if it is an eclipse bug?? I show int as red underline and the brackett after arg0 ) is also underlined.(int arg0) Thanks,
agraham Expert Licensed User Longtime User May 26, 2013 #6 You don't need that int and you are missing a semicolon at the end of the line. Upvote 0
giga Well-Known Member Licensed User Longtime User May 26, 2013 #7 agraham said: You don't need that int and you are missing a semicolon at the end of the line. Click to expand... . would this be correct?? public String toString(int arg0){ return this.siperrorcode.toString(arg0); BIG THANKS for the help. Upvote 0
agraham said: You don't need that int and you are missing a semicolon at the end of the line. Click to expand... . would this be correct?? public String toString(int arg0){ return this.siperrorcode.toString(arg0); BIG THANKS for the help.
agraham Expert Licensed User Longtime User May 26, 2013 #8 If it compiles it's correct. But it might not be what you intend! By the way you don't need that @DependsOn annotation. It is only needed for "foreign" jars not known to Basic4android that your library depends on and that are located in your additional libraries folder. Last edited: May 26, 2013 Upvote 0
If it compiles it's correct. But it might not be what you intend! By the way you don't need that @DependsOn annotation. It is only needed for "foreign" jars not known to Basic4android that your library depends on and that are located in your additional libraries folder.
giga Well-Known Member Licensed User Longtime User May 26, 2013 #9 That worked. MUCH RESPECT. . Thank You. By the way I am not a java expert by no means but is this valid }; I always thought the semicolon came after this ); thanks again. Upvote 0
That worked. MUCH RESPECT. . Thank You. By the way I am not a java expert by no means but is this valid }; I always thought the semicolon came after this ); thanks again.
agraham Expert Licensed User Longtime User May 26, 2013 #10 giga said: but is this valid }; Click to expand... It's valid but not necessary. The compiler sees the semi-colon as an empty statement. Upvote 0
giga said: but is this valid }; Click to expand... It's valid but not necessary. The compiler sees the semi-colon as an empty statement.