[[https://www.revelation.com/|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]]
==== Changing ControlSemantics question (OpenInsight 32-bit Specific) ====
=== At 17 JUN 2003 06:43:39PM John S Edgar wrote: ===
{{tag>"OpenInsight 32-bit Specific"}}
Good afternoon, everyone.
We are changing the ControlSemantics info to change the format of specific fields on the window, which change from record to record and even during.
We have all fields and tables converting their formats and displaying the data in the correct 'new' formats, but there is one annoying issue I am hoping someone can advise on.
When we change the formats and then click on another editfield or other object, OI prompts if you want to save the record. We are not saving the record, but I am wondering if, because we have changed the controlsemantics (and a few rowmaps) OI thinks we are on a new record. Whatever the cause, can someone tell us how to stop OI from prompting us to save over and over and over.
Thanks.
John.
----
=== At 17 JUN 2003 06:55PM Richard Hunt wrote: ===
John,
I am not really sure if this will help, although I would give it a try...
RESULT=SET_PROPERTY(@WINDOW,'SAVEWARN',0)
----
=== At 18 JUN 2003 03:48AM Oystein Reigem wrote: ===
John,
[i]When we change the formats and then click on another editfield or other object, OI prompts if you want to save the record.[/i]
Like you say it seems OI thinks the key was changed. Sounds a bit suspicious to me. Setting SAVEWARN [i]might[/i] fix it, but are you sure your changes to ControlSemantics and RowMaps didn't mess up other things too?
Now I don't think I ever tried to change ControlSemantics and RowMaps, and don't remember much about what they contain. And I never attempted to tackle the problem you have with dynamic format changes.
But tell me - what kind of dynamic changes is it you do to your window? Do you change Validation and Conversion for edit controls and nothing else? If that is so it seems to me there's a different possible approach:
- Make sort of a "commuter" or common UDC that is able to do every relevant format for every relevant field, both old and new formats
- Use that common UDC from every relevant edit control
- Have your app tell the common UDC about which formats to use for which fields. Do that via some sort of global variables, e.g some user-defined property of the relevant edit controls.
Just trying to make myself popular! :-)
Btw - MDI or SDI?
- Oystein -
----
=== At 18 JUN 2003 01:35PM John S Edgar wrote: ===
Thank you Oystein and Richard for your replies. I have tried the =SET_PROPERTY(@WINDOW,'SAVEWARN',0) to no avail, but I will look closer at the code to see if I can isolate the exact statement or area and be a bit more specific with the issue.
Thanks again.
John.
----
=== At 18 JUN 2003 01:44PM John S Edgar wrote: ===
Update: The Savewarn statement does work!! The statement causing the issue is a send READ to the window, but as I know the status of the current record at this time, I can suppress the save prompt.
Thanks again Oystein and Richard.
John.
[[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=A34DF8B43E7EBFBE85256D48007CD897|View this thread on the forum...]]