Rich text object is invalid with c++ api

Hello,

I have a application I developed for Lotus Notes 5.0 which uses the LNAction class to look at objects.

I am testing the same application on Lotus Notes 6.0 and when I execute the statement action.GetCount() I get the error

Rich text object is invalid.

I have updated to the latest C++ api (version 2.3) and have tried everything.

What does this error indicate and how can I fix it.

Michael

Subject: Rich text object is invalid with c++ api

Hi Michael,

I’m on the C++ API development team, can you provide a generic copy of the database in question? We can check it out.

Thanks

Subject: RE: Rich text object is invalid with c++ api

I’m having the same exact problem with the GetCount() function. Has anyone found the answer to this? I’m using the c++ api 2.3 with Notes 6.0.1.

Also if I try to access any actions in the LNActions collection I also get an error, “Object or data is corrupted.”

Thanks.

Subject: Rich text object is invalid with c++ api

I finally found the culprit: there’s a new construct in the on-disk representation of actions that is not being handled correctly. It’s built around the CDIGNORE record. Unfortunately, it still fails in Release 2.4 of the C++ API, and there’s no way to work around the problem using the C++ API. This will require a bug fix for the C++ API.

                            - - Steve Boylan

                            Notes & Domino C++ API Team

Subject: RE: Rich text object is invalid with c++ api

Hello,

Is there a solution to this yet?

Michael

Subject: RE: Rich text object is invalid with c++ api

I am experiencing a similar problem and I would like to know if this problem can be avoided using the C API, and if so, how?

Is there an example of how to achieve this? I have been using both APIS (C, C++) and I have encountered problems on both, however my skills on C API are limited.

Thanks a lot for your help.

Subject: RE: Rich text object is invalid with c++ api

It certainly isn’t a problem with the C API. Our Midas Rich Text LSX handles manipulation of rich text that uses the CDIGNORE and it does it all with the C API.

Subject: RE: Rich text object is invalid with c++ api

Is there already a fix for this bug or at least do you have an approximate date for its release?

Subject: I thought there was an announcement that the C++ API would not be supported going forward

I’m not sure about this, but it would be worthing checking.

Subject: RE: I thought there was an announcement that the C++ API would not be supported going forward

If this is true, the only way to work around this bug is to use C API?

Subject: RE: I thought there was an announcement that the C++ API would not be supported going forward

The only ways would be to a) work with the C API, b) work with DXL, or c) work with a third party product.

Subject: RE: I thought there was an announcement that the C++ API would not be supported going forward

Thank you very much for your information, Mr. Langhinrich.

Subject: RE: I thought there was an announcement that the C++ API would not be supported going forward

Does anyone know if this was resolved in the 3.0 C++ API release? I am having a similar problem - the LNAction::GetFormula method always fails, with an error code which translates to “Invalid formula format.”

Subject: Rich text object is invalid with c++ api

Hello,

The problem is with any Lotus Notes 6.0 Database. What might help is a sample of my code below.

// set error handler to capture any errors raised during function code

LNSetThrowAllErrors(true);



try

{



  Session.Init();



  // Must call this after session init

  SrcDatabaseName =  SrcFile;

  SrcServerName = "";



  DestDatabaseName = DestFile;

  DestServerName = DestServer;





  Session.GetDatabase(SrcDatabaseName, &DocDB, SrcServerName);

  DocDB.Open();



  Status = DocDB.GetForm("Memo", &SrcForm);

  

  if (Status == 0)

  {



	 SrcForm.Open();

     Status = SrcForm.GetActions(&srcActions);

     

	 // Now set the actions

     if (Status == 0)

	 { 

        Session.GetDatabase(DestDatabaseName, &DestDB, DestServerName);

        DestDB.Open();



		

        Status = DestDB.GetForm("Memo", &DestForm);            

		DestForm.Open();



		Status = DestForm.GetActions(&destActions);

        Action = srcActions[0];

        

		//First delete all the mjs actions

		nIndex = 0;

		while (nIndex < destActions.GetCount())

		{

			Action = destActions[nIndex];

    		title = Action.GetTitle();

            stitle = title;

			if (stitle.Find("MJS",0) >= 0)

			{ 

                destActions.Delete(nIndex,1);

            

			}

			else

			   nIndex++;

        }



		{

			Pos = 0;

			//for (nIndex = srcActions.GetCount() - 3; nIndex < srcActions.GetCount(); nIndex++)

			for (nIndex = 0; nIndex < 3; nIndex++)

			{

               Action = srcActions[nIndex];

			   title = Action.GetTitle();

			   stitle = title;

			   if (stitle.Find("MJS",0) >= 0)

			   {

				   destActions.Insert(Pos, Action);

				   Pos++;

               }

			}

            

			DestForm.Save();

        }



		DestForm.Close();

        SrcForm.Close();

        AfxMessageBox("MJS");



	 }

   

  }

}

Subject: RE: Rich text object is invalid with c++ api

Hi Martin,I’m sorry about the long wait (was away), we are looking into this.

The Principle developer mentioned that this sounded familiar. I’ll post more information as I get it.