CallSub2 issue

jscoulter

Member
Licensed User
Longtime User
Hi All.

I just tried to call a sub in another unit using

CallSub2(Main,"MySub",oMapData)

however, it throws an error as below:

oSettings = CallSub2(Main,\
javac 1.6.0_21
src\com\blah\vss\blah.java:310: inconvertible types
found : java.lang.String
required: anywheresoftware.b4a.objects.collections.Map.MyMap
_osettings.setObject((anywheresoftware.b4a.objects.collections.Map.MyMap)(anywheresoftware.b4a.keywords.Common.CallSub2(processBA,(Object)(mostCurrent._main.getObject()),"GetSettingsFileData",(Object)(_osettings))));
^

I checked the documentation and there is nothing to say I "can't" do this, I am passing in an object of a type Map

Can someone confirm that this ISN'T possible, or is it a wee bug?

Jeremy
 

LittleEddie

Member
Licensed User
Longtime User
What do you mean by "another unit"?

the sub you are calling is in Activity "Main" is that in a service?

 
Upvote 0

jscoulter

Member
Licensed User
Longtime User
Sorry....I am used to a different dev language that uses units.....yes the MAIN is the Activity and yes, I am calling this from a MODULE that is a service.

however, it doesnt matter if I use the Main Activity or the service module, I get an error. This error is returned by the compiler as it compiles the app.
I just noticed I didnt say that

Jeremy
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…