Page 1 of 1

ERichViewError

Posted: Thu Sep 15, 2005 5:59 am
by softtouch
TCustomRVData procedur CheckItemClass raised an exception:
ERichViewError - Can't get or set this kind of information for this item.

Its just a simple image in the text.
Image is displayed properly, but if I click it, the frame around the image is drawn and immideately the exception is raised.

Any idea what this means or how I can prevent it?

Posted: Thu Sep 15, 2005 12:31 pm
by Sergey Tkachenko
Probably your application has additional code causing this error. I cannot reproduce it in RichView demos.

This exception occurs if, for example, GetPictureInfo is called for non-picture item, such as text.

Posted: Fri Sep 16, 2005 12:20 am
by Guest
Sergey Tkachenko wrote:Probably your application has additional code causing this error. I cannot reproduce it in RichView demos.

This exception occurs if, for example, GetPictureInfo is called for non-picture item, such as text.
It is for sure a picture. It is displayed in the editor and the code check also that it is rvsPicture:

Code: Select all

if rve.CurItemStyle = rvsPicture then
rve.GetPictureInfo(rve.CurItemNo,pname,pimg,palign,ptag);
But what I figured out is that it is caused NOT on all computer, only on some computers.

Posted: Fri Sep 16, 2005 9:27 am
by Sergey Tkachenko
The code your quoted will not work properly inside tables, because in this case rve.GetPictureInfo(rve.CurItemNo,...) will attempt to get picture information from a table item.
Use GetCurrentPictureInfo instead, or
rve.TopLevelEditor.GetPictureInfo(rve.TopLevelEditor.CurItemNo,pname,pimg,palign,ptag);

Posted: Mon Sep 19, 2005 1:50 am
by softtouch
Sergey Tkachenko wrote:The code your quoted will not work properly inside tables, because in this case rve.GetPictureInfo(rve.CurItemNo,...) will attempt to get picture information from a table item.
Use GetCurrentPictureInfo instead, or
rve.TopLevelEditor.GetPictureInfo(rve.TopLevelEditor.CurItemNo,pname,pimg,palign,ptag);
The page does not contain any table, just 2 lines of text and 2 images (banners). But I will however try it with the two functions you mention and let you know the result.

Thanks!