how to find whether the form is open or not & How to check open_form & problem in hide or re [message #142543] |
Sat, 15 October 2005 05:52  |
selvakumar_82
Messages: 138 Registered: October 2005 Location: chennai
|
Senior Member |
|
|
Hi,
In my menus , i have 3 submenu items,
if i click 1st item , call_form('formname'); 1st one will appear,
if i click 2nd menu item , call_form('2ndformname');2nd one will appear,
samething for 3rd item,
finally if i click close int the top of the window, i have to close each form,
My problem is if i click anyone menu item, it should replace or hide the previous window.
I know call_form (hide and replace option was there,but i dnt know how to use ) was there , any other method is there,
|
|
|
|
|
|
|
Re: problem in hide or replace [message #142625 is a reply to message #142618] |
Mon, 17 October 2005 00:05   |
selvakumar_82
Messages: 138 Registered: October 2005 Location: chennai
|
Senior Member |
|
|
In my first menu ,
i have written
fm_id= find_form(:system.current_form);
in second menu , when ever i press
i used close_form('fm_id');
it s correct , but it s showing argument null ........?
|
|
|
|
Re: problem in hide or replace [message #142674 is a reply to message #142641] |
Mon, 17 October 2005 03:13   |
selvakumar_82
Messages: 138 Registered: October 2005 Location: chennai
|
Senior Member |
|
|
i can close the form,
but it is showing argument 1 to built in cant be null....frm-40738:
i will give u the coding,
in first form :
declare
fm_id1 formmodule;
fm_id2 formmodule;
begin
fm_id1 := find_form('class');
fm_id2 := find_form('subclass');
call_form('C:\ora6i\BIN\control');
close_form(fm_id1);
close_form(fm_id2);
end;
In second menu :
declare
fm_id formmodule;
fm_id1 formmodule;
begin
fm_id :=find_form('control');
fm_id1 :=find_form('subclass');
call_form('C:\ora6i\BIN\class');
close_form(fm_id);
close_form(fm_id1);
end;
In third form
declare
fm_id formmodule;
fm_id1 formmodule;
begin
fm_id :=find_form('control');
fm_id1 :=find_form('class');
call_form('C:\ora6i\BIN\class');
close_form(fm_id);
close_form(fm_id1);
end;
Upd-mod: Add code tags
[Updated on: Mon, 17 October 2005 17:52] by Moderator Report message to a moderator
|
|
|
Re: problem in hide or replace [message #142710 is a reply to message #142674] |
Mon, 17 October 2005 06:41   |
selvakumar_82
Messages: 138 Registered: October 2005 Location: chennai
|
Senior Member |
|
|
declare
fm_id1 formmodule;
fm_id2 formmodule;
begin
call_form('C:\ora6i\BIN\control');
fm_id1 :=find_form('class');
fm_id2 :=find_form('subclass');
if not id_null(fm_id1) then
close_form('class');
end if;
if not id_null(fm_id2) then
close_form('subclass');
end if;
end;
if i use this code , i am not able close the class form
Upd-mod: Add code tags
[Updated on: Mon, 17 October 2005 17:53] by Moderator Report message to a moderator
|
|
|
|
How to check open_form [message #143053 is a reply to message #142543] |
Tue, 18 October 2005 23:02   |
selvakumar_82
Messages: 138 Registered: October 2005 Location: chennai
|
Senior Member |
|
|
Hi,
I have a problem in closing the form,
I have to close previews forms,whenever i open another form,
So any coding s there to findout or check the open_form;
If the form is open i have to close ,
shall use like this:
if open_form('form_name') is not null then
fm_id :=find_form('class');
close_form(fm_id);
end if;
|
|
|
|
|
Re: how to find whether the form is open or not [message #143079 is a reply to message #143071] |
Wed, 19 October 2005 00:49   |
selvakumar_82
Messages: 138 Registered: October 2005 Location: chennai
|
Senior Member |
|
|
Find_form is working,
if i open multiple forms , I am not able to close all,
It s showing some errors, So in my coding itself i have to check what r the forms are open,
So i can close opened forms,,,,,,,,
I have to use IF condition for this,
I dnt know how to use Open form with IF condition ......
Got it...........?
|
|
|
|
Re: how to find whether the form is open or not [message #143094 is a reply to message #143085] |
Wed, 19 October 2005 01:23   |
selvakumar_82
Messages: 138 Registered: October 2005 Location: chennai
|
Senior Member |
|
|
I am using this coding MENUS,
In the menus i can open 3 forms ,
declare
fm_id formmodule;
fm_id3 formmodule;
begin
call_form('c:\ora6i\bin\class');
if open_form('control') is not null then
fm_id := find_form('control');
close_form(fm_id);
end if;
if open_form('subclass') is not null then
fm_id3 := find_form('control');
close_form(fm_id3);
end if;
end;
whether i can use this type of coding ...............?
|
|
|
|
Re: how to find whether the form is open or not [message #143098 is a reply to message #143095] |
Wed, 19 October 2005 01:36   |
selvakumar_82
Messages: 138 Registered: October 2005 Location: chennai
|
Senior Member |
|
|
This coding will be in class menu ,
If i press it should close other forms,
In menu item i can start with any form, Its user will open anyhting ,
So i have to write unique coding for that,
Anyway ,
1st one will be -control
2nd -class
3rd -subclass.
Can u understand my problem.....?
|
|
|
Re: how to find whether the form is open or not [message #143104 is a reply to message #143098] |
Wed, 19 October 2005 01:49  |
 |
djmartin
Messages: 10181 Registered: March 2005 Location: Surges Bay TAS Australia
|
Senior Member Account Moderator |
|
|
I know where the coding has been placed. My question is Quote: | what is the command that you are using to start your application
|
I don't think you can use the Close_Form command to close the CURRENT form. That's probably why the close_form is failing because you are trying to close the current form. You have to do an exit_form to get out of the last/only form that is running.
Use :system.current_form to determine in which form you are currently porcessing. I realise that I suggested using the current_form in a close_form. Sorry, that probably didn't work. Use the current_form to decide where you are and then find and close the other two forms.
David
|
|
|