self.li = self.gateway.jvm.java.util.ArrayList()
then I use the following code as response on a button click:
if what == 'btnLoad': # load templates and send them
res=self.db.select('select name, description from templates')
self.li = []
for r in res:
self.li.append(r[0])
gateway.entry_point.setQRYresul(self.li)
Traceback (most recent call last):
File "/Users/richard/PycharmProjects/CsServer4j/callback_listener.py", line 27, in notify
gateway.entry_point.setQRYresul(
self.li)
File "/Library/Python/2.7/site-packages/py4j/java_gateway.py", line 1151, in __call__
args_command, temp_args = self._build_args(*args)
File "/Library/Python/2.7/site-packages/py4j/java_gateway.py", line 1121, in _build_args
[get_command_part(arg, self.pool) for arg in new_args])
File "/Library/Python/2.7/site-packages/py4j/protocol.py", line 290, in get_command_part
command_part = REFERENCE_TYPE + parameter._get_object_id()
AttributeError: 'list' object has no attribute '_get_object_id'
Op dinsdag 12 december 2017 19:51:33 UTC+1 schreef Richard van Bemmelen: