![]() |
【转帖】question about acdbdatabasereactor
question about acdbdatabasereactor
question about acdbdatabasereactor i want to build a databasereactor to check whether the opened file is modified.the program is as follow: void initapplication() { // note: do not edit the following lines. //{{afx_arx_init addcommand("ww", "forreactor", "forreactor", acrx_cmd_transparent | acrx_cmd_usepickset, wwforreactor); //}}afx_arx_init // todo: add your initialization functions afxmessagebox("0"); if (docvars.docdata(acdocmanager->curdocument()).m_pwwfirstreactor) { delete docvars.docdata(acdocmanager->curdocument()).m_pwwfirstreactor; docvars.docdata(acdocmanager->curdocument()).m_pwwfirstreactor=null; } } when i open the autocad software,and load the arx,the error message is as follow: then i change the code in docdata.cpp as follow:i comment one line : if (m_pwwfirstreactor) delete m_pwwfirstreactor; cdocdata::~cdocdata() { // note: do not edit the following lines. //{{afx_arx_data_del(cdocdata) ///if (m_pwwfirstreactor) delete m_pwwfirstreactor; //}}afx_arx_data_del // todo: clean up. } then i can load the arx normally,but just once.. that mean first time i open autocad and load the arx ,it operates normally,then i close the autocad.and then i open autocad again,and load the arx,then error message appears as follow: i think it must be some error about single document and multiple docment,but i don抰 know how to solve the question, i add one line in the void unloadapplication() function ,i think maybe the reactor should be unload and delete when the application unloaded.but it doesn抰 work. void unloadapplication() { // note: do not edit the following lines. //{{afx_arx_exit acedregcmds->removegroup("ww"); //}}afx_arx_exit // todo: clean up your application if (m_pwwfirstreactor) delete m_pwwfirstreactor; } can somebody help to me? regards! attached images perhaps you'd better ask this queston on arx forum: vladimir |
所有的时间均为北京时间。 现在的时间是 06:09 AM. |