add a RAII wx connect wrapper