hangover


I have written a database application for logging requests, and I am trying to create additional functionality such that the user can drag and drop an Outlook email onto the application and it will automatically create a new record populated with the relevant details (e.g. request date, requestee, etc).

I have got the 'difficult' stuff working fine - i.e. when an Outlook email is dragged and dropped the OLEDragDrop method correctly identifies it as an Outlook email and extracts all of the relevant details.

However, when it tries to run my 'AddRecord' method to create a new record the application hangs. (When I step through it it hangs on the line which calls the method. Anything I do from that point on causes VFP to crash with either a 'mismatched pushjmp/popjmp' error or a 'Fatal error: Exception code=C0000005').

The application consists of a Top-Level form with a toolbar. The 'AddRecord' method is within the toolbar object and works fine when called from the Click method of the toolbar's 'New' command button.

Is there a limitation on calling methods contained within another form or toolbar from a form's OLEDragDrop method





Re: OLEDragDrop errors

Naomi Nosonovsky


Can you please provide some code Right now it's hard to guess what may be a problem.






Re: OLEDragDrop errors


Re: OLEDragDrop errors

hangover

Thanks Naomi and DNI.

I have fixed the problem and it turns out that it was not anything to do with the OLEDragDrop method - it was simply that I was referring to a property which did not exist. However, I would not have discovered this if I hadn't been trying to re-work the code so that I could provide a comprehensible example as requested by Naomi.

I'm still baffled as to why the error crashes VFP rather than simply producing a 'property does not exist' error, but it is all working fine now in any case.






Re: OLEDragDrop errors

Naomi Nosonovsky

Good you got it working Smile Sometimes a fresh look at the code can help.





Re: OLEDragDrop errors