Yesterday we ran into Oracle bug 1004056 while coding a module for a customer. I hear people think "Oracle Forms 60 thatâ€™s old". Yes it is but it is a platform still used by a lot of people. The bug is related to the fact that image items are not proper synchronized in a multi record block:
The form has an image with when-image-pressed trigger in order to get the record nr for each image
The form has 15 images and 15 records.
When you click on record 2 and then image 2, you will get different record numbers than the right one, e.g. record 5 instead of record 2 after you have scrolled through the record set.
In other words: the images do not get synchronized with the records.
Oracle sugests as work around: display one image at a time instead of displaying 15 images.
This was not an option for my customer.
However there is a workaround
Create a dummy image object in your block. Make sure that this dummy object is located before your image object in the block. In my case I created the image object attrib_image. Make sure that the image is located on tehsame canvas as the image you want to display, in my case the checkbox_image. Make sure that you add the code go_record(:system.mouse_record);go_item(:system.mouse_item); twice in the when-image-pressed trigger of your image item to make sure that the navigation is performed.Than add the code that needs to be executed when the image item is pressed.
After this execution you have worked around bug 1004056.