1 2 Previous Next 16 Replies Latest reply on Mar 14, 2013 4:14 PM by user346369 Go to original post
      • 15. Re: when-mouse-leave
        i'll tell you the situation again
        i've a combox box name "c" for example , and a t-list named "t" , and other items (buttons,text_items,.....) ,
        what i want is , when i leave the combo(c) going to any item on the form , hide the t-list(t) .

        i do not know , why is the need to create a pkg specification with a variable , if the only trigger would see the variable is the WNII , so i think what you need me to do is :

        create a WNII trigger on a form level , and write this :

        previous_item varchar2(90) ;
        previous_item := :system.trigger_item ; -- so , if i enter the combo(c) , the variable will hold it's name , and if i leave it to go to another item --the variable will hold the other item's name , so if i check :system.trigger_item when i enter the the other item , i will see the other item name , not the previous item combo name(c), so i can not hide the t-list this way  .

        end ;

        correct me if i am wrong

        • 16. Re: when-mouse-leave
          A package specification created within a form holds its declared variables and ( This is the most important part) the values you set in the variables for the entire time your form is running.

          When you declare the variable in the WNII trigger, each time you tab from one item to the next, the WNII trigger starts over, and the value in previous_item varchar2(90) ; is again null. What you put into your value declared in the variable is lost as soon as the trigger terminates its run.

          Each time your WNII trigger runs, it needs to see what item it was running on the last time it ran. Variables declared withIN the trigger cannot give you that.

          In the forms I write, nearly all of them have a package spec where there are a number of variables used to control the many processes within the form.
          - - - -

          After writing the code below, I see you actually don't need to store the previous location in a package variable....

          <pre>-- WNII trigger --
          If :System.trigger_item not in('BLKNAME.C','BLKNAME.XXX','BLKNAME.YYY') then
          If Get_item_property('BLKNAME.C',Displayed) = 'TRUE' then
          End if;
          If Get_item_property('BLKNAME.C',Displayed) = 'FALSE' then
          End if;
          End if;
          1 2 Previous Next