GetNoteHandle cause subforms to be modified!

Has anyone seen anything like this? We are using the C++ API 3.0, on Windows. We have an app which opens each form in a database, and then uses GetNoteHandle to get a (C API) handle, for use later. The GetNoteHandle function call results in all subforms embedded on the form to be MODIFIED! (This is a read-only app - it should NEVER modify any notes - design or data).

I thought it may have been related to how we close or destroy the handle or the LNForm object - but the change of the design of the subform occurs right after GetNoteHandle. I can step through my C++ debugger and stop before the call - then look at Domino Designer and check the mod date of the subform - at this point, all is OK. Then, I can step over the one GetNoteHandle line, then go back to Designer and check the mod date of the subform, and it is changed!

My code looks something like the following:

LNForm *frm;

LNSTATUS stat = frm->Open();

NOTEHANDLE hNote;

if (stat != LNNOERROR)

return;

if (! frm->IsOpen())

return;

// subform has not been touched at this point

hNote = frm->GetNoteHandle(true);

// subform HAS been touched here

If anyone has seen this or can reproduce it, please let me know!

BTW - this does NOT seem to occur using earlier API libs, and also does not seem to occur with an R5 client.

Thanks in advance!

Ed

Subject: GetNoteHandle cause subforms to be modified!

sounds really nasty…

i guess GetNoteHandle includes some code to check if changes made should be written back, but even if this part is buggy why should this affect subforms?

i guess only thing left to do for you is rewrite neccessary parts in c-api (shouldn’t be that hard, using NIFOpenCollection/CLASS_DESIGN followed by NIFFindDesignNote(Ext)).

Markus Seitz

markus.seitz@icodex.com