myTable = {1,2,3}
otherTable = peripheral.myFunction(myTable)
5 replies to this topic
#1
Posted 14 December 2012 - 09:11 PM
Is there any way I can accept a table (or its equivalent) as an argument of IPeripheral.callMethod(), or return something as a table? Or is there any other way to do it? E.g.
#2
Posted 14 December 2012 - 10:55 PM
No, you cannot accept tables. You can however return a table - just return a map in the object array.
#3
Posted 15 December 2012 - 03:52 AM
will that ever be changed? you could convert a table to a java map the same way you do it the other way round, couldn't you?
#5
#6
Posted 30 December 2012 - 03:58 PM
Cloudy, on 14 December 2012 - 10:55 PM, said:
No, you cannot accept tables. You can however return a table - just return a map in the object array.
So I immediately searched for it, landed here and... what do you know, simply returning a map actually works.
Well that makes life much easier. Just goes to show how studying others' code can yield more information than studying the actual documentation, hehe.
Anyway, a big thanks for implementing that!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











