Print Page | Close Window

OnBeforeEditOperationNotify

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=10048
Printed Date: 29 April 2024 at 10:22am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: OnBeforeEditOperationNotify
Posted By: Algae
Subject: OnBeforeEditOperationNotify
Date Posted: 02 April 2008 at 7:44pm
I've been experiencing a crash when deleting a calendar event (right click in calendar, select delete from the popup). Usually I can delete one event without trouble, but the second event I try to delete always crashes.

I traced it to xtpCalendarControl.cpp on about line 2097 in version 10.42 in

BOOL CXTPCalendarControl::DoDeleteEvent(CXTPCalendarViewEvent* pViewEvent)

 where it calls OnBeforeEditOperationNotify (as shown)

    if (!::IsEventExists(pData, pEvent))
    {
        return TRUE;
    }

    //------------------------------------------------------------------------
    BOOL bHandled = FALSE;

    if (m_pActiveView)
    {
        bHandled = m_pActiveView->OnBeforeEditOperationNotify(xtpCalendarEO_DeleteEvent, pViewEvent);
    }

    if (bHandled)
    {
        return TRUE;
    }

The reason it crashes is that pEvent gets clobbered.. (feefee etc)

pEvent is fine before the function, then trash afterwards. To verify, I commented out the OnBeforeEditOperationNotify and it works fine. 

I tried duplicating using the Codejock samples but was unable to do so. I'm using a CXTPCalendarCustomDataProvider with SQL. The project is unicode, statically linked. The problem occurs in both release and debug.

Any hints on what may be going on would be appreciated.

Thank you



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net