Greetings all,
Platform: Oracle 10GR2
We have an issue with a person who is visually disabled, and needs some kind of
identifier to know what the current field item he is at. After digging around the forum
I found some excellent discussions on just how to do it. I tweaked the suggestions and
simply inverted the Fore/Background color of the currently active field. However,
although I can get the code to work on a standalone test form, once I try to pull the
tested code into an in-production test case, it blows its guts up.
Error: FRM-41805. 'Ambiguous Item Name' and 'Cannot find item. Invalid ID' text descriptors.
Code: (triggered at the FORM level in both the PRE/POST-TEXT-ITEM).
DECLARE
cItem item;
cFG varchar2(30);
cBG varchar2(30);
BEGIN
-- Get the block.item ID for the current item
cItem := Find_Item(:SYSTEM.CURSOR_ITEM);
-- Save the foreground and background colors
cFG := get_item_property(cItem,FOREGROUND_COLOR);
cBG := get_item_property(cItem,BACKGROUND_COLOR);
-- Reverse the foreground and background colors
set_item_property(cItem,FOREGROUND_COLOR,cBG);
set_item_property(cItem,BACKGROUND_COLOR,cFG);
END;
I'm guessing that the problem is happening because Forms can't tell which 'Item' I'm trying to access. My question is why? By all rights, the FIND_ITEM builtin should be returning the block.item value back in a usable form. So if I'm getting a valid BLOCK.ITEM identifier, why shouldn't it resolve properly to the currently selected 'Item'?
One item of possible note: When the code was developed the developers used the same 'Item Name' across multiple blocks. For example: SEL (a selection field) is used on my test form in 6 blocks, on 5 different canvas. Of course this may make no difference at all.
Appreciate your thoughts on the matter.
Dave