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?
ERichViewError
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
It is for sure a picture. It is displayed in the editor and the code check also that it is rvsPicture: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.
Code: Select all
if rve.CurItemStyle = rvsPicture then
rve.GetPictureInfo(rve.CurItemNo,pname,pimg,palign,ptag);
-
- Site Admin
- Posts: 17555
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
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);
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.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);
Thanks!