Home » Developer & Programmer » Forms » Understanding procedure for menu scrolling (Oracle 10g developer suite, 10g , winXP)
Understanding procedure for menu scrolling [message #326694] Thu, 12 June 2008 05:23 Go to next message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
Hi,

I am not able to understand a few parts of the below mentioned procedure called in PL/SQL blocks attached with Menu. The questions are marked between the code. Q - Question, N - Narration


Procedure menu_scroll is
begin

   if name_in('system.last_record') = 'TRUE' then

[QUOTE] /*N-This is to check if there is only one record, if yes then then disable all the menu scroll options */[/QUOTE]
          if name_in('system.cursor_record') = '1' then


set_menu_item_property('MnuSubScrollTxt.MnuFrstTxt', enabled, property_false);
              set_menu_item_property('MnuSubScrollTxt.MnuPrevTxt', enabled, property_false);
              set_menu_item_property('MnuSubScrollTxt.MnuNextxt', enabled, property_false);
              set_menu_item_property('MnuSubScrollTxt.MnuLastTxt', enabled, property_false);
 
        else
[QUOTE]/*N - if this current pointer is at the last record then enable the first and previous and disable the next and last options*/[/QUOTE]
set_menu_item_property('MnuSubScrollTxt.MnuFrstTxt', enabled, property_true);
              set_menu_item_property('MnuSubScrollTxt.MnuPrevTxt', enabled, property_true);
              set_menu_item_property('MnuSubScrollTxt.MnuNexTxt', enabled, property_false);
              set_menu_item_property('MnuSubScrollTxt.MnuLastTxt', enabled, property_false);

/*Q-What does the checked property do?, why are the first and the last options checked */
set_menu_item_property('MnuSubScrollTxt.MnuFirstTxt', checked, property_false);
              set_menu_item_property('MnuSubScrollTxt.MnuLastTxt', checked, property_true);

          end if;
[QUOTE]/*Q-Here the name_in('system.cursor_record') is being used to check if this is the first record but in the previous case if was used to check if there was only one record, how come the same clause is used for two different purposes?*/[/QUOTE]
         elsif  name_in('system.cursor_record') = 1 then

set_menu_item_property('MnuSubScrollTxt.MnuFrstTxt', enabled, property_false);
              set_menu_item_property('MnuSubScrollTxt.MnuPrevTxt', enabled, property_false);
              set_menu_item_property('MnuSubScrollTxt.MnuNextTxt', enabled, property_true);
              set_menu_item_property('MnuSubScrollTxt.MnuLastTxt', enabled, property_true);

              set_menu_item_property('MnuSubScrollTxt.MnuFirstTxt', checked, property_true);
              set_menu_item_property('MnuSubScrollTxt.MnuLastTxt', checked, property_false);

         else

              set_menu_item_property('MnuSubScrollTxt.MnuFrstTxt', enabled, property_true);
              set_menu_item_property('MnuSubScrollTxt.MnuPrevTxt', enabled, property_true);
              set_menu_item_property('MnuSubScrollTxt.MnuNextTxt', enabled, property_true);
              set_menu_item_property('MnuSubScrollTxt.MnuLastTxt', enabled, property_true);

              set_menu_item_property('MnuSubScrollTxt.MnuFirstTxt', checked, property_false);
              set_menu_item_property('MnuSubScrollTxt.MnuLastTxt', checked, property_false);

           end if;

end;

Re: Understanding procedure for menu scrolling [message #337073 is a reply to message #326694] Tue, 29 July 2008 20:05 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Are you still having problems with 'menu'?

David
Re: Understanding procedure for menu scrolling [message #337278 is a reply to message #337073] Wed, 30 July 2008 07:21 Go to previous message
durgadas.menon
Messages: 365
Registered: December 2007
Location: Nowhere
Senior Member
Yes, I understood it but haven't used it much so will take some time to realize its importance

Thanks for checking in
Previous Topic: Message not displaying
Next Topic: How to call a plsql package from a form?
Goto Forum:
  


Current Time: Sun Dec 04 06:54:47 CST 2016

Total time taken to generate the page: 0.09638 seconds