Page 1 of 1

index out of bounds (-1)

Posted: Fri Jan 05, 2018 8:52 pm
Using Windows Snipping tool to paste to a dbRichEdit. IF I copy / paste, it shows works but when you move on or off the db record, the index out of bounds error occurs. If I save the Snippet Image to a JPG file and then load the picture from the file, no issues. Looking a the properties from the richedit component, the pasted images includes settings for transparency while the image loaded from disk does not.

I am on a Delphi 6 platform using version 14.12.6 of the TDBRichViewEdit Component. The exception is raised all the way to the Application Level - can I trap the exception anywhere else or is there any setting for transparency that could be causing this.

Would a newer version of the component fix the issue? I know this is tough because itemindex bounds errors could be anything...

Thanks.

Re: index out of bounds (-1)

Posted: Sat Jan 06, 2018 8:40 am
by Sergey Tkachenko
14.12.6 is a very old version. Probably it has bugs that were fixed. The current version does not have known bugs.

However, this error may occur when components are used improperly, for example the editor was not formatted after changes. A paste operation must perform all formatting automatically, but there are may be other places in your code that produce errors.
Unfortunately, I cannot find in searching bugs unless you upgrade to the new version, v14.12.6 is too old.