iOS Question B4Ih2xml problem parsing header file

walterf25

Expert
Licensed User
Longtime User
I have the following line in my header file of a library i'm trying to wrap:
setChartData:
- (void)setChartData:(B4IArray *)xValues : (B4IArray *)yValues;
But when i run the file through the B4Ih2xml jar I get the following error:
Error parsing array type: B4IArray *
parser._parsetype (java line: 763)
java.lang.IllegalStateException: No match found
at java.util.regex.Matcher.group(Unknown Source)
at anywheresoftware.b4a.keywords.Regex$MatcherWrapper.Group(Regex.java:140)
at b4j.example.parser._parsetype(parser.java:763)
at b4j.example.parser._parsemethod(parser.java:537)
at b4j.example.parser._parseline(parser.java:462)
at b4j.example.parser._parseh(parser.java:307)
at b4j.example.parser._parse(parser.java:213)
at b4j.example.main._appstart(main.java:48)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
at b4j.example.main.main(main.java:29)

Why do I get this error, does the B4Ih2xml not recognize the B4IArray type?

Any ideas?

Thanks,
Walter
 

walterf25

Expert
Licensed User
Longtime User
You need to add the array type as a comment. Example:
B4X:
- (B4IArray */*byte,1*/)ReadBytes:(NSString *)Dir :(NSString *)FileName;
- (B4INativeObject *)RunMethod:(NSString *)MethodName :(B4IArray */*NSObject,1*/)Params;
What about if I change B4IArray to NSMutableArray *
I've tried doing that and in B4I i see the NSMutableArray is changed to Object, but when I try calling the function i get an error saying something like No selector found.

Any ideas?

Walter
 
Upvote 0
Top