Home » Developer & Programmer » Forms » code error..
code error.. [message #82439] Tue, 27 May 2003 04:10 Go to next message
Mubeen..
Messages: 1
Registered: May 2003
Junior Member
Hi,I have written the following procedure,the purpose for this procedure is to enable and disable buttons at runtime.

so i am callling this procedure in button"add" by giving the following code:-
when-button-pressed trigger
item:-"add"

begin
item_enable_disable(property_off);

end;

so when i press the button add it should disable all the buttons that have been declared in the procedure.But it is not happening.

Please find below the procedure.

procedure item_enable_disable(item_on_off in number)is

begin

set_item_property('masterblk.pb_add',enabled,item_on_off);
set_item_property('masterblk.pb_delete',enabled,item_on_off);
set_item_property('masterblk.pb_view',enabled,item_on_off);
set_item_property('masterblk.pb_modify',enabled,item_on_off);
set_item_property('masterblk.add',enabled,item_on_off);
set_item_property('masterblk.delete',enabled,item_on_off);
set_item_property('masterblk.view',enabled,item_on_off);
set_item_property('masterblk.pb_save',enabled,item_on_off);
set_item_property('masterblk.save',enabled,item_on_off);
set_item_property('masterblk.modify',enabled,item_on_off);
set_item_property('masterblk.first',enabled,item_on_off);
set_item_property('masterblk.previous',enabled,item_on_off);
set_item_property('masterblk.next',enabled,item_on_off);
set_item_property('masterblk.last',enabled,item_on_off);
set_item_property('masterblk.pb_print',enabled,item_on_off);
set_item_property('masterblk.print',enabled,item_on_off);
set_item_property('masterblk.pb_lov',enabled,item_on_off);
set_item_property('masterblk.di_mode',enabled,item_on_off);
end;

please tell me where am i going wrong in the coding.

Any kind of help will be appreciated.

Thanx in Advance.

Mubeen.
Re: code error.. [message #82442 is a reply to message #82439] Tue, 27 May 2003 06:52 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
You cannot set the enabled attribute of the current item (pb_add). Why don't you navigate to another item and execute the code there (e.g. in the PRE-BLOCK, PRE-TEXT-ITEM)?

MHE
Previous Topic: error in coding...
Next Topic: Regarding Enter query and Cancel query
Goto Forum:
  


Current Time: Fri Apr 26 18:28:37 CDT 2024