LoneRanger123
Programmer
Suddenly out of the blue a peice of code that has been working fine has suddenly given an error. I have a function defined as....
void __fastcall TSidebar::make_dir_listing(TObject *Sender)
{
and declared as...
public: // User declarations
__fastcall TSidebar(TComponent* Owner);
void __fastcall make_dir_listing(TObject *Sender);
I have been adding code to a completely unrelated part of the program, but when I run it it gives and EPrivilege error and the line pointer (blue) goes to the Start of that function.
I dont know why, the code I have added is working with emails and doesnt call that function,also commenting out all the new code doesnt work. I saved the file by accident so I can get the old code which did work, but here is the new stuff
void __fastcall TSidebar::make_dir_listing(TObject *Sender)
{
and declared as...
public: // User declarations
__fastcall TSidebar(TComponent* Owner);
void __fastcall make_dir_listing(TObject *Sender);
I have been adding code to a completely unrelated part of the program, but when I run it it gives and EPrivilege error and the line pointer (blue) goes to the Start of that function.
I dont know why, the code I have added is working with emails and doesnt call that function,also commenting out all the new code doesnt work. I saved the file by accident so I can get the old code which did work, but here is the new stuff
Code:
void __fastcall TSidebar::ButEmailClick(TObject *Sender)
{
/*
state = 4;
//SET LIST IMAGEINDEX
LIST->SmallImages = ImgLstEmail;
int ct = 0; //Count current Message
if (EMAIL->Tag == 1)
EMAIL->Disconnect(); //IF CONNECTED DISCONNECT
EMAIL->Connect();
EMAIL->List();
LIST->Items->Clear();
while (ct < NoMessages) {
EMAIL->GetMailMessage(Emails[ct].ID);
ct++;
}
MessageDlg("CONNECTED",mtInformation,TMsgDlgButtons() << mbOK,0);
*/
}
//---------------------------------------------------------------------------
void __fastcall TSidebar::EMAILList(int Msg, int Size)
{
/*
Emails[NoMessages].ID = Msg;
NoMessages = NoMessages + 1;
MessageDlg(Msg,mtInformation,TMsgDlgButtons() << mbOK,0);
*/
}
//---------------------------------------------------------------------------
void __fastcall TSidebar::EMAILConnect(TObject *Sender)
{
//EMAIL->Tag = 1; //SET THE STATUS TO CONNECTED
}
//---------------------------------------------------------------------------
void __fastcall TSidebar::EMAILSuccess(TObject *Sender)
{
/* MessageDlg("Hello",mtInformation,TMsgDlgButtons() << mbOK,0);
TListItem *ListItem;
String ItemName;
ListItem = LIST->Items->Add();
ItemName = EMAIL->MailMessage->Subject;
if (ItemName.Length() > 20) {
ItemName.SetLength(17);
ItemName = ItemName + "...";
}
ListItem->Caption = ItemName;
ListItem->ImageIndex = 0;
*/
}