list_box_1->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( CMyDialog::OnSelect ) );
However, it looks like I don't have access to CMyDialog data
from CMyDialog::OnSelect() function.
What did I do wrong?
Thank you.
> However, it looks like I don't have access to CMyDialog data
> from CMyDialog::OnSelect() function.
Exact error message?
> list_box_1->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( CMyDialog::OnSelect ) );
You must use the sink argument of Connect() when connecting to a method of
another object (how do you think is wx supposed to know on which CMyDialog
to call this method if you don't tell it?). This is one of the main reasons
why Bind() is better than it.
Regards,
VZ
--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/
> For some reason, when I tried to use Bind() my VC6 came back
> saying "there is no such method in wxListbox"...
Bind() is not available for VC6, this compiler is too broken to support