I know I'm doing this wrong, however I'm not sure how to use the same instance of Person both in button_RecordData_Click and in button_List_Click
This was easy on Java however I can't figure out how to do it in C++
I just want to (when RecordData button is clicked) take the value entered on textctrl_PatFirstNam, assign it to pFirstName variable (from the Person class), and then be able to show the value of pFirstName variable on a wxMessageBox when button List is clicked
Currently, the problem is that the wxMessageBox is blank
Are you using the wxWidgets library? I’ve never approached to it and it seems I’m not the only one. I’d say you’d better ask your question in a wxWidgets forum.
The snippet syntax looks a bit weird.
::wxString
Is it recommended by wxWidgets to explicitly access the global namespace? What does it happens if you don’t do it?
Person person = Person();
What should do this line of code? Can’t you simply create an instance of Person?
…take the value entered on textctrl_PatFirstNam, assign it to pFirstName variable…
Apart from the BEM style double undescore in the class name (it’s the first time I see it in a C++ code), perhaps “textctrl_PatFirstNam” is not well defined or well assigned.
What value shows your debugger if you breakpoint the execution at that line?
What about using wxMessageBox() immediately after that assignment?