Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 24 MAR 1999 11:27:03AM N J Wong wrote:

Is there a bug with the Close Form quickevent?

I created a simple window binded to a Linear Hash table. In it, I created only 3 simple edit boxes for the key and fields and . Then, I created 2 command buttons labelled "Save" and "Close". On the "Save" button, I attached the Write Row quickevent, and on the "Close" button, I attached the Close Form quickevent.

"Save" works fine.

However, when I click "Close", I get the error message:

"Data Validation Error -

Data is required. The control may not be skipped."

and the focus and blinking cursor goes to the editbox of the @ID. There was no way I could create a command button to close the form.

Yet, the menu option "File | Exit", or even clicking the "X" close box at the top right hand corner of the window closes the form properly. I checked the event binded to "File | Exit" menu option, but it merely sends a "CLOSE" message to @WINDOW, which is exactly what the Close Form quickevent is doing in my "Close" command button.

Any suggestions how I can implement the "Close" command button is appreciated.

Thanks,

NJ


At 24 MAR 1999 11:45AM [email protected] onmouseover=window.status=why not click here to send me email?;return(true)", [url=http://www.sprezzatura.com" onMouseOver=window.status=Why not click here to visit our web site?';return(true)]Sprezzatura Group[/url] wrote:

Hmm yes, what you're getting into here is a focus issue. When a control loses focus it runs a lostfocus script which enforces validation. When you chose a menu option lostfocus if not generated (Windows default behavious).

Normally people put close buttons on an MDI frame for this reason.

[email protected]

Sprezzatura Group

World Leaders in all things RevSoft


At 24 MAR 1999 12:33PM Stephen Revelation wrote:

NJ,

There are no bugs to the close window quick event to my knowledge. You must be doing something that is blocking this event. Are you using any sort of validation and/or conversion patterns on any of your editlines in Table Builder or Form Designer? What other events/stored procedures if any are you using on this form or controls?

Any further information would be appreciated as if what you have stated is all that is truly going on, there should be no problems (I've done similar close window quick events on a click event many times with no problem).

Sincerely,

Stephen Revelation


At 24 MAR 1999 12:58PM N J Wong wrote:

Dear Stephen,

Wow! Your response speed was incredible. I am truly impressed!

I am very new to OI, but have been spending the past few weeks reading up the manuals and doing up a simple AREV Application Window port (since most of the AREV windows I use are Application Windows rather than Collectors).

First, I need to correct that the controls are Database Edit Lines instead of Edit Boxes as I wrote previously. These were created automatically by the Form Designer. I remembered it wrongly when I composed the question earlier.

The form that I mentioned is really really simple. Just those 3 database edit lines (first dbeditline linked to the @ID key, and the remaining 2 dbeditlines linked to single value fields - fields and ), and the 2 command buttons. This problem occurs only after you save a record. If you just open the form, and then click the "Close" button, the form will close. However, once you save any record, either by clicking the "Save" button, pressing , or clicking "File | Save Row" from the menu, the "Close" button will not be able to close the form because of the Data validation error message.

For the ID dbeditline, I have done many other things such as using a script to activate End_Window function, or linking it to a General event that Send_Event(@WINDOW,"CLOSE") etc. To no avail.

I have also set both the Validation and Conversion to ]", and also unchecked the "Required" checkbox, for this ID dbeditline control. Also to no avail.

I know I can still work around this by telling the boss that users will need to click "File | Exit" to close the form. However, I know he will keep bugging me why I can't put the "Close" button on the form itself like other Windows 95 applications.

Thanks for the help.

NJ


At 24 MAR 1999 01:03PM N J Wong wrote:

Dear Andrew,

Thanks for a lightning quick response! You and Stephen are really amazing.

MDI is something I have not looked at. (I just wanted to quickly do a simple AREV to OI port of a trivial application to impress the boss). I will look into this MDI area in more depth. Initially, I thought that I may need to create Collector Windows (AREV) style forms for the Application Windows that I wanted to port over to resolve this problem.

Thanks for pointing out this new area for me to look into.

Best regards,

NJ


At 24 MAR 1999 01:06PM Mikr Ruane, WinWin Solutions Inc. wrote:

NJ-

On the create event of the window, if you set the IOOPTIONS property, tenth field to 1, it should let you skip validations and requirements until the write event, so the Close button should work.

Example:

options=@@Window-]iooptions

options=1

@@Window-]iooptions=options

RETURN 1

Downside is that this will allow the user to get by the key fields without entering data. It won't save a null keyed record, but will make the user retype their data.

Hope it helps-

Mike Ruane

WinWin Solutions Inc.

WWW.WinWinSol.Com


At 24 MAR 1999 01:21PM [email protected] onmouseover=window.status=why not click here to send me email?;return(true)", [url=http://www.sprezzatura.com" onMouseOver=window.status=Why not click here to visit our web site?';return(true)]Sprezzatura Group[/url] wrote:

Well Mike has offered you another way around this without using MDI, so you might want to try that way.

Internally we try not to clutter screen real estate with buttons as it leads to replication. As everything we deploy is MDI in some way we can get away with one set of buttons on the MDI frame for all windows!

[email protected]

Sprezzatura Group

World Leaders in all things RevSoft


At 24 MAR 1999 02:54PM Stephen Revelation wrote:

NJ,

That's pretty much how I envisioned your form. There should not be a problem based on what you have told me. Like you said, the form is a basic as can be.

Have you ported this table over from Arev? Are these fields from and OpenInsight Table that you created? If so, check the column attributes for each column to verify that nothing strange has been checked of or selected such as the default setting. Mike's posting should work like he said but at this point, since it doesn't seem to be much of a form, it may be best to try to re-create the form from scratch. This is indeed abnormal behavior based on what you have told us.

Regards,

Stephen Revelation


At 25 MAR 1999 03:17PM N J Wong wrote:

Dear Stephen,

The table is a new table created using Table Builder. After reading your response, I used a new hard disk to install a vanilla Win 95 and reinstall OI (its version 3.6.1) from the Works CDROM. I re-created the form from scratch, and the data validation error is still encountered.

I have used Mike's solution, and it works.

Thanks for the help.

NJ


At 25 MAR 1999 03:18PM N J Wong wrote:

Dear Mike,

THANKS!!! Your solution works beautifully!!!

Best regards,

NJ

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/28a400951476ce938525673e0054e018.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1