CAPITAL Office Business Software
CAPITAL Support Forum
Cardfile Script no Save

Post new topic   Reply to topic    CAPITAL Office Business Software Forum Index -> Scripting & Customisation
View previous topic :: View next topic  
Author Message

PostPosted: Fri Jun 09, 2006 3:51 pm    Post subject: Cardfile Script no Save Reply with quote

Changing the value of various fields (via 'ScrWrite()') that live on the third (possibly any page other than the one with focus) page of a tabbed dialog, while the focus is on another page, does not fire the 'Save' button. If the record is saved at that time (via the message dialog) an error is generated.
However, if 'Write()' is used instead of 'ScrWrite()' there is no problem whatsoever.
Admittedly, there is no need to be seeing what is on page 3, or 4, or whatever at the time of writing the data but I find this behaviour disturbing as it suggests that the usage of 'ScrWrite()' is perhaps dependant on screen focus. In other words, ScrWrite here, but Write there etc.
Is this something you have experienced? The very simplest scripts also reproduce the problem, and it is the same for either logical or Text fields and probably all field types.
Thanks in advance for any feedback whatsoever,
Back to top
COBS Tech Support

Joined: 09 Sep 2005
Posts: 651

PostPosted: Wed Jun 14, 2006 6:05 pm    Post subject: Reply with quote

What version of CAPITAL are you running? And what maintenance release?

Fortunately, or unfortunately, depending on your perspective on this issue, SCRWrite() in CAPITAL 7.41 and above will cause the 'save' button to enable. This will, unfortunately, cause badly written scripts behind user screens to fail to run properly in later releases. At present in earlier versions of CAPITAL, SCRWrite() is suppressed in many instances, particularly if placed inside field formulas.

SCRWrite() should never be called from a field formula, whatever version of CAPITAL you use. But only from the Screen Script.

Write() should not be called except inside a 'post save' event, as you would then be altering a database record that either does not yet exist, or you would be overriding the functionality of the 'undo' button among other problems. Doing this may also cause random 'assertion' or 'internal' error messages to appear and is not recommended.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    CAPITAL Office Business Software Forum Index -> Scripting & Customisation All times are GMT + 10 Hours
Page 1 of 1

Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

phpBB Template by Vereor
Protected by Anti-Spam ACP