Home » Developer & Programmer » Forms » Do you want to save changes is gone
Do you want to save changes is gone [message #661113] Wed, 08 March 2017 05:31 Go to next message
anddiiss
Messages: 5
Registered: March 2017
Junior Member
Hi, guys.
New aroud here.
I've been looking a lot but couldn't find an answer for my question.

Usually when form_status is changed, or at least it was in the past, before doing a when-window-closed, a dialog would pop up asking to save changes if they were made.
This dialog is gone and there is no way I can figure out why a changed form doesn't trigger this message. What's wrong?

BR, Andis
Re: Do you want to save changes is gone [message #661114 is a reply to message #661113] Wed, 08 March 2017 05:40 Go to previous messageGo to next message
cookiemonster
Messages: 13864
Registered: September 2008
Location: Rainy Manchester
Senior Member
What version are you using?
How many datablocks do you have and are they based on database objects?
What is the block status of the blocks when you exit?
Re: Do you want to save changes is gone [message #661117 is a reply to message #661114] Wed, 08 March 2017 06:19 Go to previous messageGo to next message
anddiiss
Messages: 5
Registered: March 2017
Junior Member
Block status is changed.
There are multiple datablocks and I've changed a blocks item that is a db item to get the status - changed.
This is really weird in my humble opinion.

Our team uses Forms 6.
Re: Do you want to save changes is gone [message #661119 is a reply to message #661117] Wed, 08 March 2017 06:21 Go to previous messageGo to next message
cookiemonster
Messages: 13864
Registered: September 2008
Location: Rainy Manchester
Senior Member
Is it just that one form that has the problem?
When did it last work?
Re: Do you want to save changes is gone [message #661120 is a reply to message #661119] Wed, 08 March 2017 06:24 Go to previous messageGo to next message
anddiiss
Messages: 5
Registered: March 2017
Junior Member
This also affects other forms.
My findings indicate that when an inbuilt oracle forms procedure windows_closed that checks the stack and exits form if it's the base, uses exit_form(no_validate), is this really how it should be? Because when changing it to do_key('exit_form'), dialog is present.
Re: Do you want to save changes is gone [message #661123 is a reply to message #661120] Wed, 08 March 2017 07:17 Go to previous messageGo to next message
cookiemonster
Messages: 13864
Registered: September 2008
Location: Rainy Manchester
Senior Member
I can't find any built-in called windows_closed, are you sure that's the right name?
Have you written code that calls this built-in?
If so what trigger(s) are you calling it from?
Re: Do you want to save changes is gone [message #661124 is a reply to message #661123] Wed, 08 March 2017 07:20 Go to previous messageGo to next message
anddiiss
Messages: 5
Registered: March 2017
Junior Member
Are you sure?

It's window_closed and we call it from when-window-closed trigger.
Sorry for the mistake in the previous message.

BR, Andis

[Updated on: Wed, 08 March 2017 07:22]

Report message to a moderator

Re: Do you want to save changes is gone [message #661125 is a reply to message #661124] Wed, 08 March 2017 07:32 Go to previous messageGo to next message
cookiemonster
Messages: 13864
Registered: September 2008
Location: Rainy Manchester
Senior Member
Paste the exact code here
Re: Do you want to save changes is gone [message #661126 is a reply to message #661125] Wed, 08 March 2017 07:33 Go to previous messageGo to next message
anddiiss
Messages: 5
Registered: March 2017
Junior Member
BEGIN	
	IF :system.current_block = 'KALK_LIN' THEN --MBT-7853 RKU
	  Go_Item('SHIP_KALK_CANCEL');	  
    Execute_Trigger('WHEN-BUTTON-PRESSED');
		window_closed;		
	ELSE
   window_closed;
	END IF;
END;

Its pretty simple. If I do: do_key('exit_form') then the message is shown. I've found countless of topics with assistance needed to get rid of the message, but our users say that the message is missing if form is closed with a cross when form_status is changed.

Okay, turns out this isn't inbuilt. Those are our own libraries we used, I'm just new to the project.
Anyway, what's the most used thing in the when-window-closed?

[Updated on: Wed, 08 March 2017 07:50]

Report message to a moderator

Re: Do you want to save changes is gone [message #661128 is a reply to message #661126] Wed, 08 March 2017 08:17 Go to previous messageGo to next message
joy_division
Messages: 4949
Registered: February 2005
Location: East Coast USA
Senior Member
I've been using forms for 20 years. I have never used the WHEN-WINDOW-CLOSED trigger.

If you want the prompt to save changes then simply do EXIT_FORM;
Re: Do you want to save changes is gone [message #661129 is a reply to message #661128] Wed, 08 March 2017 08:20 Go to previous message
cookiemonster
Messages: 13864
Registered: September 2008
Location: Rainy Manchester
Senior Member
As Joy says, the most used thing in when-window-closed is nothing.
If you delete the trigger the prompt should come back.
Previous Topic: Why is fmx not difference in different pc
Next Topic: master detail problem
Goto Forum:
  


Current Time: Mon Mar 30 18:34:35 CDT 2020