Convert bool to string

Asked by spyros-liakos on 2017-11-28

def Save_Settings(event):
 configFile = File("config.properties")
 inProps = Properties()
 inProps.setProperty("Member", check_member_enable.isSelected())
 outputStream = FileOutputStream(configFile)
 inProps.store(outputStream, "host setttings")
 outputStream.close()

I get this error: TypeError: setProperty(): 2nd arg can't be coerced to String
I try: inProps.setProperty("Member", String.valueOf(check_member_enable.isSelected())

**How can I make this work.. ???
Thank you!

Question information

Language:
English Edit question
Status:
Solved
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
2017-11-29
Last query:
2017-11-29
Last reply:
2017-11-29
Best RaiMan (raimund-hocke) said : #1

Consult the class Properties about possible setProperty() variants.

spyros-liakos (spy-arts) said : #2

Thanks RaiMan, that solved my question.