[ROOT] I: Notification: Inbound Mail Failure
From: Magro Giuseppe (gmagro@seasoft.it)
Date: Thu Feb 22 2001 - 17:21:13 MET
Sorry but Bajely Tony don't work here .
He has changed work.
Dear Rooters, I have tried to implement a example by Fons Rademakers, on how
to control the closing of a canvas window. My code segment looks like this:
bool Global::CanvasOpen(char* name, char* title, Int_t dx, Int_t dy)
{
if (!rootapp) rootapp = new TApplication("EVA", 0, 0);
c = new TCanvas(name,title,dx,dy);
/* have added this: */
rc = (TRootCanvas*)c->GetCanvasImp();
rc->Connect("CloseWindow()", 0, 0, "monitorClose()"); //Crashes here
return 0;
}
<<[ROOT] Problem with TRootCanvas::Connect>>
attached mail follows:
Dear Rooters, I have tried to implement a example by Fons Rademakers, on how
to control the closing of a canvas window. My code segment looks like this:
bool Global::CanvasOpen(char* name, char* title, Int_t dx, Int_t dy)
{
if (!rootapp) rootapp = new TApplication("EVA", 0, 0);
c = new TCanvas(name,title,dx,dy);
/* have added this: */
rc = (TRootCanvas*)c->GetCanvasImp();
rc->Connect("CloseWindow()", 0, 0, "monitorClose()"); // Crashes
<file://Crshes> here
return 0;
}
void monitorClose()
{
// todo
}
This was working fine without the rc->... statements. When I try to open a
Canvas the application crashes at the indicated statement (rc is previously
declared as TRootCanvas*). The message of the debugger is:
Unhandeled access violation in evamfc2.exe (LIBCORE.DLL): 0xC0000005: Access
Violation
Note that I'm using root and mfc in a VC++6 environment.
Any suggestions?
Dimitris
This archive was generated by hypermail 2b29
: Tue Jan 01 2002 - 17:50:37 MET