yet another Overide question

Paul Gale

New Member
Hi Guys,

Trying to track down a solution to this little problem..(smart objects Ver 9.1D)
Have a smart window, Tool bar, Broswer and Viewer with an Exit button.
Validation of my fileds are in the Update record procedure in the viewer (I'm aware this may not the best place to put it).

If the user is in update mode and press Exit or the small x and an update is in process I get the progress message do you want to save current values before you exit ?
Press yes then brings up my validation .. ie a field not entered. Pressing OK just exits the program with out giving the user the option to type in the changes.

What can I do to correct this ? All our projects have their validation in the update routine so we have to stick to this for now. Is there a state I can check for in this routine ? can I give my own message ? Just letting the user know that all changes will be lost and then bypass Update record would be ok again how ?

Any hints would be greatly appreciated ..

Paul (looking forward to getting an Advanced smart objects course one day !!)
 
On the trigger for WINDOW-CLOSE, BEFORE progress' standard behaviour involkes put your organisations validation check there. If your validation is in a seperate include/procedure you can exit safely once your validation is correct otherwise THEN you can fall out backinto standard behaviour.
I know my explanation is a little time-warped, I am more familure with ADM(1).
Regards
 

Paul Gale

New Member
another Overide problem ..

Cheers.

Came up with an idea at lunchtime which I've gone with for now ..

Added the following to Exit button and Window close procedures.

I check to see if update is active in the viewer.. If it isn't I exit normaly.

If it is I send out a message to the user to explain that they will lose their changes do they want to continue ? if they say YES .. I then do this ..

RUN onChoose IN h_dyntoolbar
( INPUT "CANCEL" ).
APPLY "CLOSE":U TO THIS-PROCEDURE.
RETURN.

which simulates me pressing cancel and then closes.

Probaly not the best answer but I was quite pleased with that as a newbie :)

Paul
 
Top