ERichViewError

General TRichView support forum. Please post your questions here
Post Reply
softtouch
Posts: 49
Joined: Thu Sep 15, 2005 5:56 am

ERichViewError

Post 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?
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
Guest

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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);
softtouch
Posts: 49
Joined: Thu Sep 15, 2005 5:56 am

Post 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!
Post Reply