walk icon indicating copy to clipboard operation
walk copied to clipboard

CheckBox - read if checked crashed

Open josprou opened this issue 4 years ago • 2 comments

Hi, I have a login form that breaks when I go to read if the CheckBox is checked. The code is the following:

loginform.txt

The line that breaks is the following: var remember = dlg.remembermeCheck.CheckState()

The exception produces a "runtime error: invalid memory address or nil pointer reference" error

Thank you

A greeting

josprou avatar Jul 30 '20 15:07 josprou

Puedo formular la misma pregunta del siguiente modo: ¿Cómo puedo obtener el valor de un checkBox al pulsar sobre un botón?

josprou avatar Aug 03 '20 15:08 josprou

It looks like you do not initialize LoginDialog.remembermeCheck, which you access in LoginDialog.onLoginButtonClicked. In newLoginDialog only the local variable remembermeCheck is initialized.

lxn avatar Sep 02 '20 15:09 lxn