Code: Select all
class libDialog : public wxDialog
{
public:
libDialog(const wxString &title);
void CancelClicked(wxCloseEvent& event);
void StartClicked(wxCommandEvent& event);
bool CreateLibrary();
private:
int newSongs;
bool isScanning;
wxString rootDirectory;
protected:
wxDirPickerCtrl *currentDirectoryPicker;
};
libDialog::libDialog(const wxString &title) : wxDialog(NULL, -1, title, wxDefaultPosition, wxSize(475, 260))
{
isScanning = false;
[...]
Connect(ID_CancelButton, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) &libDialog::CancelClicked);
Connect(ID_StartButton, wxEVT_COMMAND_BUTTON_CLICKED, (wxObjectEventFunction) &libDialog::StartClicked);
}
void libDialog::CancelClicked(wxCloseEvent& event)
{
if(isScanning == false)
{
this -> Destroy();
}
else
{
isScanning = false;
}
}
void libDialog::StartClicked(wxCommandEvent& event)
{
if(isScanning == false)
{
isScanning = true;
}
else
{
rootDirectory = currentDirectoryPicker -> GetPath();
if(wxDir::Exists(rootDirectory) == true)
{
if(CreateLibrary() == false)
{
//
}
else
{
//
}
}
}
}
bool libDialog::CreateLibrary()
{
return true;
}
Can anybody spot it? Is there a secret I'm missing? Sorry if it seems like I'm just letting other people solve my problems, but I already tried looking it over (many times).
FlyingIsFun1217