Home » Developer & Programmer » Forms » WHEN-MOUSE-DOUBLE-CLICK in a non database block
WHEN-MOUSE-DOUBLE-CLICK in a non database block [message #321162] Mon, 19 May 2008 05:09 Go to next message
rahul15june
Messages: 35
Registered: May 2008
Member
Hi,

I have a non database multirecord block with 5 text items. I want to add a "when mouse double click" trigger such that when ever users click on any one of the 5 text items, the when mouse double click trigger. which opens a stacked canvas and does some operation. My question,

1. Do we need to copy and paste the "WHEN-MOUSE-DOUBLE-CLICK" TRIGGER to all the five text items?

2. Can't I just place it at the block level, so that that when I double click on any item , it fires? I tried it , it did not work.

The reason being that everytime I have make a change in the trigger. I have to make the change in 5 places since currently I have it on all five text items.

thanks,
Rahul
Re: WHEN-MOUSE-DOUBLE-CLICK in a non database block [message #321185 is a reply to message #321162] Mon, 19 May 2008 06:26 Go to previous messageGo to next message
Littlefoot
Messages: 20891
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Create a procedure and put all trigger logic in there.

Call this procedure from all of these triggers.

If something changes, you'll have to modify it only in the procedure - triggers will remain intact.
Re: WHEN-MOUSE-DOUBLE-CLICK in a non database block [message #321325 is a reply to message #321162] Mon, 19 May 2008 21:19 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Yes you can define 'when-mouse-double-click' trigger at the block level.

Do you have 'mouse down', 'mouse up' or 'mouse click' defined at this block's level?

Did you place 'message; pause;' pairs in your trigger?

David
Re: WHEN-MOUSE-DOUBLE-CLICK in a non database block [message #321413 is a reply to message #321325] Tue, 20 May 2008 03:49 Go to previous messageGo to next message
rahul15june
Messages: 35
Registered: May 2008
Member
Thanks Little foot and DJMartin.

DJ Martin- I don't have any other trigger define. I dont have nay message, pause etc in the trigger. For now, I followed Littlefoots advice because,

1. I tried creating the trigger on the non databvase multirecord block at block level, but nothing seemed to happen

2. I notice something really weird, I have a when mouse doubleclick trigger apart from a key next item trigger both having the same code in a text item. Somehow when I run the forms, and say i double click, it raises an error. So go back to the when mouse double click trigger, put a message, random twice and run the form again. - double click, the message pops up and close the form- comment out the messages and save/generate and run again.. everything works fine. But this happens everytime I try to modify forms.

3. Even when I had the trigger associated with all 5 text items, some functionality would not work with one of the text items although all had the same code.

I was wondering if I am the only one facing this issue. There seems to be some bug with the WHEN-MOUSE-DOUBLE-CLICK event in forms6i.

I then tried out little foots advice and that worked better. But still it would have been better to have the trigger at block level.

thanks,
Rahul
Re: WHEN-MOUSE-DOUBLE-CLICK in a non database block [message #321608 is a reply to message #321413] Tue, 20 May 2008 19:48 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Make usre that you do a Ctrl-Shft-k (Compile All) before doing the Ctrl-t (Generate).

Please post the code that you have in the W-M-DC trigger.

David
Re: WHEN-MOUSE-DOUBLE-CLICK in a non database block [message #321875 is a reply to message #321608] Wed, 21 May 2008 12:05 Go to previous messageGo to next message
rahul15june
Messages: 35
Registered: May 2008
Member
Hi DJMartin,

Thanks for the pointer. Yes, I generally have the bad habit of directly making a change and pressing Generate and Saving rather than doing a compile all. I will try to first compile all every time and then generate and keep a watch if the issue occurs again. By the way, does not compiling all and directly generating the form have any known issues/errors ? OR is it just a safety measure that you are mentioning.

Thanks for your help!

Rahul
Re: WHEN-MOUSE-DOUBLE-CLICK in a non database block [message #321936 is a reply to message #321875] Wed, 21 May 2008 19:57 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Which version of Forms are you using?

David
Re: WHEN-MOUSE-DOUBLE-CLICK in a non database block [message #322130 is a reply to message #321936] Thu, 22 May 2008 10:09 Go to previous messageGo to next message
rahul15june
Messages: 35
Registered: May 2008
Member
I use Forms 6i (Forms [32 Bit] Version 6.0.8.8.0)

Re: WHEN-MOUSE-DOUBLE-CLICK in a non database block [message #322735 is a reply to message #322130] Mon, 26 May 2008 02:11 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have a look at http://www.oracle.com/technology/products/forms/htdocs/clientsod_forms6i.html

What patchset does this represent? What Jinitiator version are you using? I suggest your google these two pieces of information and see what you retrieve from Oracle's site in terms of a matrix.

David
Re: WHEN-MOUSE-DOUBLE-CLICK in a non database block [message #323050 is a reply to message #322735] Tue, 27 May 2008 03:27 Go to previous message
rahul15june
Messages: 35
Registered: May 2008
Member
Well, I tried your previous simple but correct advice of compile all and them generation of the form, and that seems be working just fine for now. However, thanks for the link. Will check that out if the issue crops up again.

Thanks again,
rahul
Previous Topic: Tab canvas vanishes when clicking on an item on content canvas
Next Topic: Relationships
Goto Forum:
  


Current Time: Sat Dec 03 16:27:45 CST 2016

Total time taken to generate the page: 0.28342 seconds