Home » Developer & Programmer » Forms » WHEN-NEW-ITEM-INSTANCE is not firing with GO_ITEM (Forms 6i)
WHEN-NEW-ITEM-INSTANCE is not firing with GO_ITEM [message #562529] Thu, 02 August 2012 00:49 Go to next message
sandeepgujje
Messages: 28
Registered: January 2012
Location: India
Junior Member
Hello Experts,

I'm facing a small problem with GO_ITEM

In my form I'm having 2 text items - ITEM1, ITEM2

Triggers on ITEM1
-------------------------
KEY-NEXT-ITEM

MESSAGE('1 KEY-NEXT-ITEM - ITEM1');
PAUSE;
GO_ITEM('ITEM2');
GO_ITEM('ITEM1');
-------------------------


Triggers on ITEM2
-------------------------
WHEN-NEW-ITEM-INSTANCE

MESSAGE('2 WHEN-NEW-ITEM-INSTANCE');
PAUSE;

-------------------------
KEY-NEXT-ITEM

MESSAGE('3 KEY-NEXT-ITEM');
PAUSE;
-------------------------


I expected all(1, 2, 3) messages will come when i pressed tab on ITEM1, but only Message1 came..

Experts, Any Idea regarding this.?
Happy to provide more details if required..!!
Thanks in Advance.
Awaiting for your Reply.. Smile

- Sandy

[EDITED by LF: fixed topic title typo; was "WHNE"]

[Updated on: Thu, 02 August 2012 02:16] by Moderator

Report message to a moderator

Re: WHNE-NEW-ITEM-INSTANCE is not firing with GO_ITEM [message #562538 is a reply to message #562529] Thu, 02 August 2012 01:29 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Only KEY-NEXT-ITEM on ITEM1 fired, and that is expected.

GO_ITEM('ITEM2') moved focus to ITEM2, but WHEN-NEW-ITEM-INSTANCE on ITEM2 didn't fire because of its restriction: Forms navigates through an item without stopping to accept input. A culprit is GO_ITEM('ITEM1') - try to comment it and you'll see that WHEN-NEW-ITEM-INSTANCE on ITEM2 will fire (because Forms will stay in ITEM2 waiting for input).

KEY-NEXT-ITEM on ITEM2 wouldn't fire anyway - nobody pressed NEXT-ITEM in ITEM2 (GO_ITEM <> pressing the keyboard).
Re: WHNE-NEW-ITEM-INSTANCE is not firing with GO_ITEM [message #562547 is a reply to message #562538] Thu, 02 August 2012 01:58 Go to previous messageGo to next message
sandeepgujje
Messages: 28
Registered: January 2012
Location: India
Junior Member
Hi LF,
Thanks for your reply and suggestion..

I'm working on an application, due to some restriction i can't write the code which is there in WHEN-NEW-ITEM-INSTANCE(ITEM2) and KEY-NEXT-ITEM(ITEM2) in KEY-NEXT-ITEM of ITEM1.. So, I thought if we navigate to that ITEM2 and come back to the ITEM1 will raise the triggers on ITEM2..
but which is not happening.

So, I tried writing like
KEY-NEXT-ITEM - ITEM1

GO_ITEM('ITEM2');
DO_KEY('KEY-NEXT-ITEM');
GO_ITEM('ITEM1');



when we press TAB on ITEM1, it is well known fact that now KEY-NEXT-ITEM on ITEM2 will fire after KEY-NEXT-ITEM of ITEM1..

But, I need WHEN-NEW-ITEM-INSTANCE on ITEM2 to be fired..
any clue regarding this..?

Thanks in Advance Experts..Smile

Re: WHNE-NEW-ITEM-INSTANCE is not firing with GO_ITEM [message #562548 is a reply to message #562547] Thu, 02 August 2012 02:16 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
What & when is WHEN-NEW-ITEM-INSTANCE (ITEM2) trigger supposed to do? Try to rename that trigger to PRE-TEXT-ITEM and see whether it does what you need.
Re: WHNE-NEW-ITEM-INSTANCE is not firing with GO_ITEM [message #562550 is a reply to message #562548] Thu, 02 August 2012 02:52 Go to previous message
sandeepgujje
Messages: 28
Registered: January 2012
Location: India
Junior Member
Hi LF,

Finally got the expected functionality by writing like
KEY-NEXT-ITEM - ITEM1

GO_ITEM('ITEM2');
EXCECUTE_TRIGGER('WHEN-NEW-ITEM-INSTANCE');
DO_KEY('KEY-NEXT-ITEM');
GO_ITEM('ITEM1');


Thanks for your patience in answering me.. Smile

-Sandy
Previous Topic: Sound in Oracle Forms 10g
Next Topic: webutil
Goto Forum:
  


Current Time: Fri Jul 05 21:33:48 CDT 2024